home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1984 January to June
/
Ahoy_Magazine_84-Jan-Jun_1984_Double_L.d64
/
cursor
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
829b
|
29 lines
0 rem...commodore's column #1 - rupert- 8/21/83
1 rem--ahoy--jan issue--cursor--prog page 44
2 rem use kernal routine 'plot' to position cursor
3 print chr$(147) :rem clear screen
4 rem store machine language in memory
5 sa=49152 :rem starting address
10 x=0
20 read b
25 if b=-1 then 110
30 poke sa+x,b
40 x=x+1
45 goto20
50 data 162,0,160,0,24,32,240,255,96,-1
100 rem --------------------------------
105 rem...put cursor at 1,10
110 row=1:col=10:gosub1010
120 print"* here it is at 1,10"
125 rem...put cursor at 20,15
130 row=20:col=15:gosub 1010
140 print"*now it is at 20,15
999 [128]
1000 [143] routine to put cursor at position row,col
1005 [143] row = 0 to 24 : col = 0 to 39
1010 [139] row[179]0 [176] row[177]24 [167] [153] "invalid row":[137] 1040
1015 [139] col[179]0 [176] col[177]39 [167] [153] in[197]id col":goto 1040
1020 poke sa+1,row:poke sa+3,col
1030 sys sa
1040 return