home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / jsage / znode3 / z80dos / z80d20a.lbr / Z80DHDR.LZB / Z80DHDR.LIB
Encoding:
Text File  |  1993-06-08  |  4.4 KB  |  138 lines

  1. ;
  2. ; Z80DOS - Z80 Disk Operating System
  3. ;
  4. ; Version 2.0a - BETA TEST VERSION - 6 Nov 87 by Carson Wilson
  5. ;
  6. ; Support file:    Z80DHDR.LIB
  7. ; Version:    2.0
  8. ; Date:        6 Nov 87
  9. ; Author:    Carson Wilson
  10. ; Changes:    Added RTC equate.  If false, use internal DOS routine
  11. ;        instead of BIOS call for get/set time.  Default address
  12. ;        for buffer is 50 hex.
  13. ;
  14. ; Description:    Options and Standard Equates
  15.         
  16. ; --------------------------------------------------------------------
  17.  
  18. ; Specify where in memory your BDOS begins and where your BIOS ends.
  19. ; The next two equates must be set for the particular system.
  20. ; You can use either kilobyte or page boundaries.
  21. ;
  22. ; The number for "MSize/MPages" is where your BIOS ENDS in memory.  For
  23. ; standard 64k CP/M systems this is 64 kilobytes/256 pages.
  24. ;
  25. ; The number for "base" is where your CCP BEGINS in memory.  This is
  26. ; computed using MSize and a value n which is the size in kilobytes/pages
  27. ; of your entire operating system (CCP+BDOS+BIOS).  You should be able
  28. ; to get these values from the source code of your BIOS.
  29. ;
  30. ; 1 page = 256 bytes, so 4 pages = 1 kilobyte.
  31. ;
  32.  
  33. ; Specify addresses using kilobyte boundaries:
  34.  
  35. MSize    equ    64            ; Standard 64k system size
  36. base    equ    (MSize-9)*1024        ; (MSize-n) where n is size of
  37.                     ; ..BIOS+DOS+CCP in kilobytes
  38.                     ; N varies with the length of
  39.                     ; ..your BIOS.
  40.  
  41. ; Or, specify addresses using page boundaries:
  42.  
  43. ;MPages equ    256            ; 256 page system size
  44. ;base    equ    (MPages-37)*256     ; (mpages-n) where n is size in
  45.                     ; ..pages of BIOS+DOS+CCP
  46.                     ; N varies with the length of
  47.                     ; ..your BIOS.
  48.  
  49. ; Standard addresses and equates - don't change the next five equates:
  50.  
  51. RamLow    equ    0000h            ; Start address memory
  52. DOS    equ    base+800h        ; Start address DOS
  53. BIOS    equ    DOS+00e00h        ; Start address BIOS
  54. false    equ    0
  55. true    equ    not false
  56.  
  57.  
  58. ; RTC - Real Time Clock
  59. ;
  60. ;     Set to true if you are using a Real Time Clock as the 
  61. ; source for your time, and fill in the address at BIOStim below.  
  62. ;
  63. ;    Set to false to use a 5 byte buffer in protected memory 
  64. ; as a substitute for a Real Time Clock, and give the address of 
  65. ; the 5 byte buffer at label TimeBuf below.
  66. ;
  67. RTC    equ    false        ; Real time clock
  68.  
  69.      if    RTC
  70. BIOStim    equ    BIOS+nnnn    ; Address of BIOS jump or RTC driver
  71.  
  72.      else
  73. TimeBuf    equ    50h        ; Address of 5-byte buffer 
  74.      endif    ; RTC
  75.  
  76.  
  77. ; ResDsk - You can optionally define an alternate disk for disk reset.
  78. ;       This is useful in floppy systems with a virtual drive feature.
  79. ;       By defining a non-virtual drive (drive B in Morrow MD3) as the
  80. ;       reset disk, you avoid having to switch back to disk A every time a
  81. ;       disk reset is performed.  However, this requires that you always
  82. ;       have a diskette in drive B:.
  83. ;
  84.  
  85. ResDsk    equ    0    ; CP/M default is disk A for resets
  86.             ; ..0=A, 1=B, 2=C, etc.
  87.  
  88.  
  89. ; Options -    Bit 0: public file enable(1)/disable(0)
  90. ;        Bit 1: delay 256 characters active(1)/disable(0)
  91. ;
  92. Options    equ    00000011B        ; Enable public file and delay
  93.  
  94.  
  95. ; -------------------------------------------------------------
  96. ;
  97. ; The remaining equates should stay the same for all systems:
  98. ;
  99. ; -------------------------------------------------------------
  100.  
  101. ; Standard BIOS function offsets:
  102.  
  103. Boot    equ    BIOS+00000h        ; BIOS cold boot
  104. WBoot    equ    BIOS+00003h        ; BIOS warm boot
  105. ConSt    equ    BIOS+00006h        ; BIOS console status
  106. ConIn    equ    BIOS+00009h        ; BIOS console input
  107. ConOut    equ    BIOS+0000ch        ; BIOS console output
  108. list    equ    BIOS+0000fh        ; BIOS list output
  109. punch    equ    BIOS+00012h        ; BIOS punch output
  110. reader    equ    BIOS+00015h        ; BIOS reader input
  111. home    equ    BIOS+00018h        ; BIOS home disk
  112. SelDsk    equ    BIOS+0001bh        ; BIOS select disk
  113. SetTrk    equ    BIOS+0001eh        ; BIOS select track
  114. SetSec    equ    BIOS+00021h        ; BIOS select sector
  115. SetDMA    equ    BIOS+00024h        ; BIOS set DMA address
  116. read    equ    BIOS+00027h        ; BIOS read 128 bytes
  117. write    equ    BIOS+0002ah        ; BIOS write 128 bytes
  118. ListSt    equ    BIOS+0002dh        ; BIOS list status
  119. SecTrn    equ    BIOS+00030h        ; BIOS sector translation
  120.  
  121. ; Internal definitions:
  122.  
  123. ContC    equ    003h            ; Key to generate warm boot
  124. ContH    equ    008h            ; Backspace
  125. ContS    equ    013h            ; Control-S
  126. tab    equ    009h            ; Tab
  127. lf    equ    00ah            ; Line feed
  128. cr    equ    00dh            ; Carriage return
  129. ContP    equ    010h            ; Set/reset print flag
  130. ContX    equ    018h            ; Delete line (backspaces)
  131. DrvSep    equ    03ah            ; Drive seperator (:)
  132. rubout    equ    07fh            ; Delete last char
  133. ;
  134. MaxCmd    equ    40            ; Number of valid DOS commands
  135.  
  136. ; END Z80DHDR.LIB
  137.  
  138.