Retro Game & PC/매뉴얼 팁 작업

Commodore 64 Basic 연습

smores 2013. 11. 4. 11:36

http://www.lemon64.com/manual/

C64 Basic Tutorial !!! pretty nice !!!



copy and paste into VICE64 (alt+ins)

program using small letter, then automatically converted into capital

if in capital, it will be special characters


while running basic program, break key = ESC


using VICE64, can make new empty disk

then initialize by disk command routine


VICE64: ctrl+shift  C= key ???


0 command$="n:basic disk"

10 open 1,8,15

20 print#1,command$

30 close 1


see the floppy disk commands (Appendix B: list of ...)


to save the file

save "filename",8


to see the disk directory

load "$",8,1

list



maze1.bas

===============

10 print chr$(205.5+rnd(1)); : goto 10


noise1.bas

===============

10 poke 54272+int(rnd(1)*25),int(rnd(1)*256) : goto 10


kaleidoscope.bas - need to debug

===============

10 print chr$(147)

20 ca=1024:cp=54272:row=25:col=40

30 poke 53280,0:poke 53281,0

40 forw=3to50:fori=1to12:forj=0to12:k=i+j

50 c=j+j+j/(i+3)+i*2/12

60 k1=ca+i+(col*k):i1=ca+k+(col*i):c1=cp+k1:c2=cp+i1

70 k2=ca+(col-i)+(col*(row-k)):i2=ca+(col-k)+(col*(row-i)):c3=cp+k2:c4=cp+i2

80 k3=ca+(col-i)+(col*k):c5=cp+k3:i3=ca+k+(col*(row-i)):c6=cp+i3

90 k4=ca+(col-k)+(col*i):c7=cp+k4:i4=ca+i+(col*(row-k)):c8=cp+i4

100 pokek1,81:pokec1,c:pokei1,81:pokec2,c

110 pokek2,81:pokec3,c:pokei2,81:pokec4,c

110 pokek3,81:pokec5,c:pokei3,81:pokec6,c

110 pokek4,81:pokec7,c:pokei4,81:pokec8,c

1000 next j,i,w

1100 goto 10


another maze

===============

10 rem maze, chr$(147) - clear screen

20 print chr$(147);

30 print chr$(205.5+rnd(1));

40 goto 30



print characters

===============

10 print chr$(147); :rem clear the screen

20 print chr$(142); :rem choose uppercase/graphics display mode

30 skip=0

40 for k=0 to 255

50 poke 1024+2*k+40*skip,k

60 poke 55296+2*k+40*skip,1

70 if (k+1)/20=int((k+1)/20) then skip=skip+1

80 next k

90 goto 90