home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol090 / sfclos.mac < prev    next >
Encoding:
Text File  |  1984-04-29  |  474 b   |  34 lines

  1. ;
  2. ; SYSLIB Module Name:  SFCLOS
  3. ; Author:  Richard Conn
  4. ; SYSLIB Version Number:  2.0
  5. ; Module Version Number:  1.0
  6. ; Module Entry Points:
  7. ;    F$CLOSE
  8. ; Module External References:
  9. ;    BDOS
  10. ;
  11.  
  12. ;
  13. ;  F$CLOSE -- CLOSE FILE WHOSE FCB IS PTED TO BY DE
  14. ;    RET W/A=0 IF OK
  15. ;
  16.     EXT    BDOS
  17.  
  18. F$CLOSE::
  19.     PUSH    H    ; SAVE HL
  20.     PUSH    B    ; SAVE BC
  21.     MVI    C,B$CLOS
  22.     CALL    BDOS
  23.     CPI    255    ; ERROR?
  24.     JZ    FCLSDN
  25.     XRA    A    ; A=0
  26. FCLSDN:
  27.     POP    B    ; RESTORE BC
  28.     POP    H    ; RESTORE HL
  29.     RET
  30.  
  31. B$CLOS    EQU    16    ; CLOSE FILE
  32.  
  33.     END
  34.