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 >
Commodore BASIC  |  2022-10-26  |  829b  |  29 lines

  1. 0 rem...commodore's column #1 - rupert-        8/21/83
  2. 1 rem--ahoy--jan issue--cursor--prog page 44
  3. 2 rem use kernal routine 'plot'         to position cursor
  4. 3 print chr$(147)    :rem clear screen
  5. 4 rem store machine language in memory
  6. 5 sa=49152       :rem starting address
  7. 10 x=0
  8. 20 read b
  9. 25 if b=-1 then 110
  10. 30 poke sa+x,b
  11. 40 x=x+1
  12. 45 goto20
  13. 50 data 162,0,160,0,24,32,240,255,96,-1
  14. 100 rem --------------------------------
  15. 105 rem...put cursor at 1,10
  16. 110 row=1:col=10:gosub1010
  17. 120 print"* here it is at 1,10"
  18. 125 rem...put cursor at 20,15
  19. 130 row=20:col=15:gosub 1010
  20. 140 print"*now it is at 20,15
  21. 999 [128]
  22. 1000 [143] routine to put cursor at                 position row,col
  23. 1005 [143]  row = 0 to 24 : col = 0 to 39
  24. 1010 [139] row[179]0 [176] row[177]24 [167] [153]         "invalid row":[137] 1040
  25. 1015 [139] col[179]0 [176] col[177]39 [167] [153]           in[197]id col":goto 1040
  26. 1020 poke sa+1,row:poke sa+3,col
  27. 1030 sys sa
  28. 1040 return
  29.