home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / simtel / sigm / vols200 / vol276 / zcpr3cmd.lbr / HELP.CMD < prev    next >
OS/2 REXX Batch file  |  1986-06-11  |  1KB  |  58 lines

  1. ;command: HELP
  2. ;Written by Richard Conn, modified by Bob Logan
  3. ;
  4. ;prints a list of commands available to zcpr3
  5.  
  6. HELP    EQU    $
  7.  
  8.     .phase    Z3CMD
  9.  
  10. H_E:
  11.     IF    ROMVERS        ;for testing set false & load rom contents
  12.                 ;into ram at appropriate address (works fine)
  13.     SWRMON            ;macro for turning on rom card
  14.     ENDIF
  15.  
  16.     LD    HL,CMDTBL+1
  17.     LD    B,NCHARS    ;number of chars in a command
  18. LSTCMD:
  19.     LD    E,10        ;number of commands per line
  20.     CALL    CRLF3
  21. NOCR:
  22.     PUSH    BC
  23. HLOOP:
  24.     LD    A,(HL)
  25.     OR    A
  26.     JR    Z,FINIS        ;look for end of table, 0 if finished
  27.     CALL    LCOUT
  28.     INC    HL
  29.     DJNZ    HLOOP
  30.     CALL    PRINT3
  31.     DB    ' ',' '+80H    ;2 spaces
  32.     POP    BC
  33.     INC    HL        ;skip length of routine
  34.     INC    HL
  35.     INC    HL        ;skip execute address of routine
  36.     INC    HL
  37.     INC    HL        ;skip start address of routine
  38.     INC    HL
  39.     DEC    E
  40.     LD    A,E
  41.     CP    0
  42.     JR    NZ,NOCR
  43.     JR    LSTCMD
  44.  
  45. FINIS:
  46.     POP    BC
  47.  
  48.     IF    ROMVERS
  49.     SWRMOFF            ;macro for turning off rom card
  50.     ENDIF
  51.  
  52.     XOR    A        ;set no error for ZCPR3
  53.     RET
  54.  
  55. H_L    EQU    $-H_E
  56.  
  57.     .dephase
  58.