home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol264 / zlib2.lbr / Z3MSG7.Z80 < prev    next >
Encoding:
Text File  |  1986-03-23  |  768 b   |  34 lines

  1. ;
  2. ; Z3LIB Module Name:  Z3MSG7
  3. ; Author:  Richard Conn
  4. ; Z3LIB  Version Number:  1.3
  5. ; Module Version Number:  1.1
  6. ;
  7.     public    qerror
  8.  
  9.     ext    getmsg
  10.  
  11. ;
  12. ;    QERROR returns the ZCPR3 command status message in A and the
  13. ; Zero Flag Set (Z) if this message indicates that an Error has been
  14. ; encountered.  If such is the case, HL contains the address of the
  15. ; first character of the error line.  The PSW and HL are affected.
  16. ;
  17. qerror:
  18.     call    getmsg        ;get ptr to messages
  19.     inc    hl        ;offset of 3
  20.     inc    hl
  21.     inc    hl
  22.     ld    a,(hl)        ;get command status message
  23.     push    af
  24.     inc    hl        ;pt to error address
  25.     ld    a,(hl)
  26.     inc    hl
  27.     ld    h,(hl)
  28.     ld    l,a        ;HL contains error address
  29.     pop    af
  30.     cp    2        ;set Z flag if error
  31.     ret
  32.  
  33.     end
  34.