home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / jsage / znode3 / z3shell / cmdpatch.lbr / CMDPATCH.Z80 < prev   
Encoding:
Text File  |  1993-06-08  |  1.4 KB  |  46 lines

  1.  
  2. ; This file patches two changes into version 1.0 of CMD.  The first change
  3. ; makes it reset the shell bit in the message buffer command status flag so
  4. ; that the external or internal error handler will be invoked for bad commands.
  5. ; Before, the error was treated as a shell error, which resulted in the entire
  6. ; shell stack being cleared.  The second change eliminates the extra space
  7. ; after the prompt character '>' in the command prompt.  This extra space was
  8. ; confusing in cases where one wanted deliberately to enter a command with a
  9. ; leading space to force invocation of the ZCPR33 extended command processor.
  10. ;
  11. ; This file should be assembled to a HEX file and overlaid on CMD.COM using the
  12. ; MLOAD command line: MLOAD CMDNEW=CMD.COM,CMDPATCH1.
  13. ;
  14. ;                    Jay Sage, April 17, 1987
  15.  
  16. patch    equ    480h        ; End of existing program code
  17. resume    equ    10bh        ; Where existing code actually started
  18. fix    equ    26ah        ; Address of extra ' ' in string
  19.  
  20.         ; Vector to patch
  21.  
  22.     org    100h
  23.  
  24.     jp    patch
  25.  
  26.         ; Fix command prompt string
  27.  
  28.     org    fix
  29.  
  30.     db    0        ; Replace ' ' by null
  31.  
  32.         ; New code stuck on end
  33.  
  34.     org    patch
  35.  
  36.     ld    hl,(109h)    ; Get ENV address
  37.     ld    de,22h        ; Offset to Z3MSG
  38.     add    hl,de
  39.     inc    hl        ; Offset to command status flag
  40.     inc    hl
  41.     inc    hl
  42.     res    0,(hl)        ; Reset the shell bit
  43.     jp    resume        ; Resume original code
  44.  
  45.     end
  46.