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-OZ.ARK / Z2PATOZ.ASM < prev    next >
Assembly Source File  |  1985-02-09  |  1KB  |  84 lines

  1. ;
  2. ;  ZCPR2 Patch for Osborne 1 with ROM 1.4
  3. ;
  4. ;    This patch implements external paths
  5. ; and multiple command line buffer.
  6. ;
  7. ;    ZCPR2 must be installed for a 58K System.
  8. ;
  9. ;    Special Osborne Version of ZCPR2, as
  10. ; opposed to the distribution ZCPR2, must be
  11. ; used due to the 1.4 ROM.
  12. ;  ZCPR2 Constants --
  13. ;    Beginning of Scratch Area for Buffers
  14. ;    Base Address of External Path
  15. ;
  16. z2scr    equ    0e600h    ;1K below video ram
  17. path    equ    40h    ;external path
  18.  
  19. ;
  20. ;  Macros -- (MAC used to assemble)
  21. ;
  22. @gendd    macro    ?dd
  23.     if (?dd gt 7fh) and (?dd lt 0ff80h)
  24.     db    100h    ;Displacement Range Error on JR
  25.     else
  26.     db    ?dd
  27.     endif
  28.     endm
  29. jr    macro    ?n
  30.     db    18h
  31.     @gendd    ?n-$-1
  32.     endm
  33. jrnz    macro    ?n
  34.     db    20h
  35.     @gendd    ?n-$-1
  36.     endm
  37. ldir    macro
  38.     db    0edh,0b0h
  39.     endm
  40. ;
  41. ;
  42. ;
  43.     org    0e546h-1024
  44.     pop    b
  45.     dcr    b    ;=0 if cold boot
  46.     jrnz    done
  47. ;
  48. ;  Cold Boot
  49. ;    Initialize:
  50. ;        Multiple Command Line Buffer
  51. ;        Default Path
  52. ;
  53.     lxi    h,cmdset    ;default MCL
  54.     lxi    d,clbase    ;base
  55.     lxi    b,20
  56.     ldir
  57.     lxi    h,path        ;init path
  58.     mvi    m,1        ;drive A
  59.     inx    h
  60.     mvi    m,0
  61.     inx    h
  62.     mvi    m,0
  63.     lxi    d,0    ;normal entry
  64.     jr    done1
  65. ;
  66. ;  Initial Values for MCL Buffer
  67. ;
  68. clbase    equ    z2scr
  69. clblen    equ    200
  70. cmdset:    dw    clbase+4
  71.     db    clblen
  72.     db    0
  73.     db    'STARTUP'
  74.     db    0
  75. ;
  76. ;  Cleanup Routine
  77. ;
  78.     org    0e5a5h-1024
  79. done:
  80.     lxi    d,3
  81. done1:
  82.  
  83.     end
  84.