home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / enterprs / c128 / text / examples.arc / DCLEAR.A < prev    next >
Encoding:
Text File  |  1989-12-01  |  1.3 KB  |  39 lines

  1. ;dclear.asm
  2. ;================================================
  3. ; Command:    close all open files on all drives
  4. ;================================================
  5.                                   
  6. int0e       = $170e               
  7. setlfs      = $ffba               
  8. setnam      = $ffbd               
  9. open        = $ffc0               
  10. close       = $ffc3               
  11.                                   
  12. star        = $0b00               
  13.             .wor star             
  14.             * = star              
  15.  
  16.             jmp dclear
  17.             dw Date
  18.                       
  19. dclear      lda #8                
  20.             sta device            
  21. clear       lda #15               ;close 15
  22.             jsr close             
  23.             lda #15               ;open 15,dv,15
  24.             tay                   
  25.             ldx device            
  26.             jsr setlfs            
  27.             lda #0                
  28.             jsr setnam            
  29.             jsr open              
  30.             inc device            
  31.             lda device            
  32.             cmp #31               
  33.             bne clear             
  34.             jmp int0e             
  35.                                   
  36. device      *=*+1                 
  37.                                   
  38.             .end                  
  39.