home *** CD-ROM | disk | FTP | other *** search
/ Transactor / Transactor_27_1988_Transactor_Publishing.d64 / devpres.bas (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  566b  |  18 lines

  1. 100 rem  device presence checker
  2. 110 rem  by paul g sawyer
  3. 120 rem  store device # in 252,
  4. 130 rem  sys to routine (49152),
  5. 140 rem  then peek(251). if value is
  6. 150 rem  0 then device is off,
  7. 160 rem  1 then device is on.
  8. 170 rem
  9. 180 rem  if device checked is a disk
  10. 190 rem  drive, initilize after calling
  11. 200 rem  routine.
  12. 220 for i=49152 to 49191:read x:poke i,x:next
  13. 230 data 169,   0, 133, 251, 165, 252, 170, 160
  14. 240 data   0,  32, 186, 255, 169,   1, 166, 251
  15. 250 data 160,   0,  32, 189, 255,  32, 192, 255
  16. 260 data 165, 144,  72, 165, 252,  32, 195, 255
  17. 270 data 104,  48,   4, 169,   1, 133, 251,  96
  18.