home *** CD-ROM | disk | FTP | other *** search
- 100 sys 700
- 110 ;paul g. sawyer
- 120 ;
- 130 ;orangeville, on
- 140 ;
- 150 ;
- 160 ;device presence checker
- 170 ;-----(relocatable)-----
- 180 ;put device # in location 252
- 190 ;after calling routine, read
- 200 ;location 251. if its value is
- 210 ;0 then the device is off, or
- 220 ;1 then the device is on.
- 230 ;
- 240 ;note- if using device 8 or 9
- 250 ;and drive is on, the error light
- 260 ;will be flashing, but just
- 270 ;initialize the drive and all
- 280 ;will be ok.
- 290 ;
- 300 *=$c000
- 310 .opt oo
- 320 device = $fc
- 330 onflag = $fb
- 340 lda #0: sta onflag
- 350 lda device: tax: ldy #0
- 360 jsr $ffba ;setlfs
- 370 lda #1: ldx onflag: ldy #0
- 380 jsr $ffbd ;setnam
- 390 jsr $ffc0 ;open
- 400 lda $90: pha
- 410 lda device: jsr $ffc3 ;close
- 420 pla: bmi off
- 430 on lda #1: sta onflag
- 440 off rts
-