home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / ZCPR2 / ZCPR2-MD.LBR / Z2PATMD.ASM < prev    next >
Assembly Source File  |  2000-06-30  |  1KB  |  67 lines

  1. ;
  2. ;  PATCH:  Z2PATCH.ASM
  3. ;  AUTHOR:  Richard Conn
  4. ;  NOTE:  This is a Patch to the MicroDecision BIOS (Ver 1.3)
  5. ;    which implements the following extended features of
  6. ;    ZCPR2 on the MicroDecision --
  7. ;        External Paths for Command Search
  8. ;        Multiple Command Line Buffer
  9. ;        ZCPR2 External Stack
  10. ;
  11.  
  12. ;
  13. ;  ZCPR2 Equates
  14. ;
  15. zcpr2    equ    0dc00h    ;Base Address of ZCPR2 Itself
  16. gocpm    equ    0f2a0h    ;GOCPM Entry Point in BIOS
  17. z2stack    equ    0f9d0h    ;Bottom of ZCPR2 External Stack
  18. z2tos    equ    z2stack+48    ;Top of ZCPR2 External Stack
  19. mclbuf    equ    z2tos    ;Beginning of Multiple Command Line Buffer
  20. path    equ    40h    ;Base Address of External Path
  21. patch    equ    0fca8h    ;Patch Begins Here
  22.  
  23. ;
  24. ;  Patch --
  25. ;
  26.     org    patch
  27. ;
  28.     lxi    h,clbase    ;init command line
  29.     lxi    d,mclbuf    ;copy into buffer
  30.     mvi    b,40        ;40 chars
  31.     call    move
  32. ;
  33.     lxi    h,pathbase    ;init default path
  34.     lxi    d,path
  35.     mvi    b,10        ;10 bytes
  36.     call    move
  37. ;
  38.     lxi    h,zcpr2        ;set pointer
  39.     jmp    gocpm
  40. ;
  41. ;  Move Routine
  42. ;
  43. move:
  44.     mov    a,m    ;get
  45.     stax    d    ;put
  46.     inx    h    ;pt to next
  47.     inx    d
  48.     dcr    b    ;count down
  49.     jnz    move
  50.     ret
  51. ;
  52. ;  Default Values
  53. ;
  54. clbase:
  55.     dw    mclbuf+4    ;pt to first char
  56.     db    200        ;200 chars
  57.     db    0
  58.     db    'STARTUP'    ;default command
  59.     db    0
  60. pathbase:
  61.     db    'A'-'@',0    ;goto A0
  62.     db    0
  63. ;
  64. ;  End of Patch
  65. ;
  66.     end
  67.