Skip to content

Commit 6a86808

Browse files
committed
neo6502 BASIC
1 parent b76ee1b commit 6a86808

File tree

4 files changed

+68
-0
lines changed

4 files changed

+68
-0
lines changed

neo6502/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Files for Neo6502 running neo6502-firmware
2+
3+
Basic runs in approximately 9.11 seconds for characters and 9.37
4+
seconds for bitmap using native BASIC.

neo6502/m2bitmap.bsc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
1000 t0=time( )
2+
1010 cls
3+
1020 rect solid
4+
1030 for py=0 to 21
5+
1040 yz=py*2/22-1
6+
1050 for px=0 to 31
7+
1060 xz=px*3.5/32-2.5
8+
1070 x=0:y=0:i=0
9+
1080 while i<=14&x*x+y*y<=4
10+
1090 xt=x*x-y*y+xz
11+
1100 y=2*x*y+yz
12+
1110 x=xt
13+
1120 i=i+1
14+
1130 wend
15+
1140 rect ink i from px*10,py*10 by 9,9
16+
1150 next
17+
1160 next
18+
1170 ink 7,0
19+
1180 t= (time( ) -t0) /100
20+
1190 while inkey$( ) = "" :wend
21+
1200 print t

neo6502/m2hires.bsc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
1000 t0=time( )
2+
1010 cls
3+
1020 for py=0 to 239
4+
1030 yz=py*2.625/240-1.3125
5+
1040 for px=0 to 319
6+
1050 xz=px*3.5/320-2.5
7+
1060 x=0:y=0:i=0
8+
1070 while i<=47&x*x+y*y<=4
9+
1080 xt=x*x-y*y+xz
10+
1090 y=2*x*y+yz
11+
1100 x=xt
12+
1110 i=i+1
13+
1120 wend
14+
1130 plot ink i%16 to px,py
15+
1140 next
16+
1150 next
17+
1160 ink 7,0
18+
1170 t= (time( ) -t0) /100
19+
1180 while inkey$( ) = "" :wend
20+
1190 print t

neo6502/m2print.bsc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
1000 t0=time( )
2+
1010 cls
3+
1020 for py=0 to 21
4+
1030 yz=py*2/22-1
5+
1040 for px=0 to 31
6+
1050 xz=px*3.5/32-2.5
7+
1060 x=0:y=0:i=0
8+
1070 while i<=14&x*x+y*y<=4
9+
1080 xt=x*x-y*y+xz
10+
1090 y=2*x*y+yz
11+
1100 x=xt
12+
1110 i=i+1
13+
1120 wend
14+
1130 ink 7,i
15+
1140 print;
16+
1150 next
17+
1160 ink 7,0
18+
1170 print
19+
1180 next
20+
1190 ink 7,0
21+
1200 t= (time( ) -t0) /100
22+
1210 while inkey$( ) = "" :wend
23+
1220 print t

0 commit comments

Comments
 (0)