Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 0 poke 53265,peek(53265) and 239:poke 53280,6:poke 53281,6:dim a(3):a(0)=2
- 1 print chr$(147);".this is one of my favourite 'routines' which celebrates";
- 2 print" the 50th anniversary of the programming language basic. it has been written ";
- 3 print"for the supercpu, and will work with other ";
- 4 print"accelerator devices that support the famous c64. why not just use 1mhz, you";
- 5 print" may ask? well, i don't see the point, and with a bit more processing ";
- 6 print"grunt, i can be lazy and write very unoptimised";
- 7 print" basic. it runs very slow @ 20mhz anyway! greetings ";
- 8 print"go out to mike d, allan b, nigel p, peter b, wayne w";
- 9 print" and my biggest fan...mum! happy birthday basic, and happy birthday ";
- 10 print"scpu (slightly early, i know). keep programming. read micro";
- 11 print" mart. and send me abuse on twitter @shaunbebbers. byez...*"+chr$(142)+chr$(8);
- 12 sc=1024:m=49152:a(1)=-80:a(2)=-2:a(3)=80:wl=160:hl=32:for i=0 to 39:poke 56256+i,3:next
- 13 poke m,peek(sc):if peek(sc)<>42 then sc=sc+1:m=m+1:goto 13
- 14 sc=1024:a=sc+81:for i=0 to 959:poke 55296+i,14:poke sc+i,32:next:for x=0 to 23
- 15 for i=sc to sc+38:poke i,160:next i:sc=sc+40:next x:sc=1024:poke a,4:poke 53265,peek(53265)or 16
- 17 j=int(rnd(1)*4):x=j
- 18 b=a+a(j):if peek(b)=wl then poke b,j:poke a+a(j)/2,hl:a=b:goto 17
- 19 j=(j+1)*-(j<3):if j<>x then 18
- 20 j=peek(a):poke a,hl:if j<4 then a=a-a(j):goto 17
- 21 poke a,81:j=2
- 22 b=a+a(j)/2:if peek(b)=hl then poke b,81:poke a,hl:a=b:j=(j+2)+4*(j>1)
- 23 j=(j-1)-4*(j=0):m=49152:i=peek(m)
- 24 m=m+1:if peek(m)<>42 then poke m-1,peek(m):goto 24
- 25 poke m-1,i:poke m,42:for i=0 to 36:poke 1985+i,peek(49152+i):next:goto 22
- 1000 rem by donkeysoft mmxiv to celebrate 50 years of basic
- 1001 rem for the commodore 64 + supercpu or other accelerator
- 1002 rem highlighted with XBasic as there was no Commodore BASIC option
- 1003 rem lines zero to 13 copies the message to ram after switching off the screen
- 1004 rem line 12 also colours the bottom row of the screen cyan
- 1005 rem line 14 - 15 fills the area to be used for then maze and then switches the screen back on
- 1006 rem line 17 - 20 generates the maze
- 1007 rem lines 21 - 23 moves the lost ball around the maze to the boundaries
- 1008 rem lines 23 - 24 shuffles the scrolly message in ram
- 1009 rem line 25 outputs the first 37 characters of the scrolly and loops back to 22
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement