home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / lambda / soundpot / p / z33rcp02.lbr / RCPTST.LZB / RCPTST.LIB
Encoding:
Text File  |  1993-10-25  |  1.3 KB  |  57 lines

  1.     page
  2.  
  3. ; RCP-TST.Z80    'TST' Command
  4.  
  5. ;=============================================================================
  6. ;
  7. ;    E R R O R    T E S T    C O M M A N D
  8. ;
  9. ;=============================================================================
  10.  
  11. ; Command:    TST
  12. ; Function:    To set the message buffer program error flag based on
  13. ;        error count reported by M80 or L80
  14. ; Syntax:    TST PN  where PN is (at least) the first letter of M80 or L80
  15.  
  16. testerr:
  17.  
  18. ; Check for name of program to test
  19.  
  20.     ld    a,(fcb1+1)    ; Get first character in program name
  21.  
  22.      if    testm80
  23.     ld    hl,m80f        ; Preset for m80 test counts
  24.     ld    de,m80w
  25.     cp    'M'
  26.     jr    z,testcount
  27.      endif            ; Testm80
  28.  
  29.      if    testf80
  30.     ld    hl,f80f
  31.     ld    de,f80w
  32.     cp    'F'
  33.     jr    z,testcount
  34.      endif            ; Testf80
  35.  
  36. ; If no match, give error message
  37.  
  38.     call    print
  39.     db    'bad nam','e'+80h
  40.  
  41. testcount:
  42.     ld    a,(hl)        ; Test first error count word
  43.     inc    hl
  44.     or    (hl)
  45.     ex    de,hl        ; Test second word
  46.     or    (hl)
  47.     inc    hl
  48.     or    (hl)
  49.     ld    hl,z3msg+6    ; Point to program error flag
  50.     ld    (hl),0        ; Clear it
  51.     ret    z        ; If counts were zero, we are done
  52.     ld    (hl),0ffh    ; Else set the error flag
  53.     ret
  54.  
  55. ; End RCP-TST.Z80
  56.  
  57.