home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / jsage / znode3 / uploads / zzap21.lbr / CPMZ80.LZB / CPMZ80.LIB
Encoding:
Text File  |  1993-06-07  |  6.1 KB  |  191 lines

  1. .COMMENT *
  2.     LIBRARY        CPMZ80.LIB
  3.  
  4.        This file contains the various CP/M and H-89 equates
  5. and definitions used for the MACRO-80 assembler and CP/M.
  6.  
  7. NOTE:    Some of the equates in this file are not used by the current
  8.     program. This file is generic in nature, in that a number of
  9.     different programs use different portions of it.
  10. *
  11.     .Z80        ;Always program in Z-80 code
  12. ;-----------------------------------------
  13. ; BDOS call vector commands
  14. ;-----------------------------------------
  15. CONIN    EQU    01H        ;BDOS Console Input
  16. CONOUT    EQU    02H        ;BDOS Console Output
  17. AUXIN    EQU    03H        ;BDOS Auxiliary Input
  18. AUXOUT    EQU    04H        ;BDOS Auxiliary Output
  19. LSTOUT    EQU    05H        ;BDOS write to LST device
  20. DCONIO    EQU    06H        ;BDOS Direct Console I/O
  21. AUXNST    EQU    07H        ;BDOS Auxiliary Input Status
  22. AUXOST    EQU    08H        ;BDOS Auxiliary Output Status
  23. PRTSTR    EQU    09H        ;BDOS Print String
  24. RDCONB    EQU    0AH        ;BDOS Read Console Buffer
  25. GCONST    EQU    0BH        ;BDOS Get Console Status
  26. RETVER    EQU    0CH        ;BDOS Return Version Number
  27. RESDSK    EQU    0DH        ;BDOS Reset Disk System
  28. SELDSK    EQU    0EH        ;BDOS Select Disk
  29. FOPEN    EQU    0FH        ;BDOS File Open
  30. FCLOSE    EQU    10H        ;BDOS File Close
  31. SRCH1    EQU    11H        ;BDOS Search For First
  32. SRCHN    EQU    12H        ;BDOS Search For Next
  33. DELFL    EQU    13H        ;BDOS Delete File
  34. FREAD    EQU    14H        ;BDOS File Read
  35. FWRITE    EQU    15H        ;BDOS File Write
  36. MAKEFL    EQU    16H        ;BDOS Make New File
  37. RENMFL    EQU    17H        ;BDOS Rename File
  38. RETLOG    EQU    18H        ;BDOS Return Login Vector
  39. CURDSK    EQU    19H        ;BDOS Find Default Drive
  40. SETDMA    EQU    1AH        ;BDOS Set DMA Address
  41. GETADD    EQU    1BH        ;BDOS Get Allocation Address
  42. WRPROT    EQU    1CH        ;BDOS Write Protect Disk
  43. GTRDVC    EQU    1DH        ;BDOS Get Read-Only Vector
  44. SETFIL    EQU    1EH        ;BDOS Set File Attributes
  45. GETDPB    EQU    1FH        ;BDOS Get DPB Parameters Address
  46. USRSET    EQU    20H        ;BDOS Set User Number
  47. RDFRND    EQU    21H        ;BDOS Read File Random
  48. WTFRND    EQU    22H        ;BDOS Write File Random
  49. COMPFL    EQU    23H        ;BDOS Compute File Size
  50. SETRND    EQU    24H        ;BDOS Set random record number
  51. ;-----------------------------------------
  52. ; Analytical Products speed mod port info
  53. ;-----------------------------------------
  54. CPORT    EQU    0F2H        ;General Purpose Port address
  55. CBIT    EQU    00001000B    ;Mask for Clock Speed 2/4 Mhz
  56. ;-----------------------------------------
  57. ; ASCII character equates
  58. ;-----------------------------------------
  59. NULL    EQU    00H
  60. SOH    EQU    01H
  61. STX    EQU    02H
  62. ETX    EQU    03H
  63. EOT    EQU    04H
  64. ENQ    EQU    05H
  65. ACK    EQU    06H
  66. BELL    EQU    07H
  67. BS    EQU    08H
  68. TAB    EQU    09H
  69. LF    EQU    0AH
  70. NL    EQU    LF
  71. VT    EQU    0BH
  72. FF    EQU    0CH
  73. CR    EQU    0DH
  74. SO    EQU    0EH
  75. SI    EQU    0FH
  76. DLE    EQU    10H
  77. DC1    EQU    11H
  78. DC2    EQU    12H
  79. DC3    EQU    13H
  80. DC4    EQU    14H
  81. NAK    EQU    15H
  82. SYN    EQU    16H
  83. ETB    EQU    17H
  84. CAN    EQU    18H
  85. EM    EQU    19H
  86. SUB    EQU    1AH
  87. ESC    EQU    1BH
  88. FS    EQU    1CH
  89. GS    EQU    1DH
  90. RS    EQU    1EH
  91. US    EQU    1FH
  92. SPC    EQU    20H
  93. DELETE    EQU    7FH
  94. ENL    EQU    NL+80H
  95. ;-----------------------------------------
  96. ; Control Character Equates
  97. ;-----------------------------------------
  98. ctrlc    equ    3
  99. ctrld    equ    4
  100. ctrlf    equ    6
  101. ctrlm    equ    13
  102. ctrlp    equ    16
  103. ctrlq    equ    17
  104. ctrlr    equ    18
  105. ;-----------------------------------------
  106. ; H-89 Keyboard equates
  107. ;-----------------------------------------
  108. ERASE    EQU    74
  109. BLU    EQU    80
  110. RED    EQU    81
  111. WHT    EQU    82
  112. FUNC1    EQU    83
  113. FUNC2    EQU    84
  114. FUNC3    EQU    85
  115. FUNC4    EQU    86
  116. FUNC5    EQU    87
  117. ;-----------------------------------------
  118. ; Printer port addresses and equates
  119. ;   for the Z-89-11 Multi-Mode I/O Board
  120. ;-----------------------------------------
  121. PBASE    EQU    340Q
  122. STB.ON    EQU    00
  123. STB.OF    EQU    01
  124. PDA    EQU    PBASE+0
  125. PDC    EQU    PBASE+2
  126. PCTL    EQU    PBASE+3
  127. ;-----------------------------------------
  128. ; Analytical Products
  129. ; Real Time Clock port equates
  130. ;-----------------------------------------
  131. RTCBAS    EQU    80H        ;RTC port base address
  132. RTCSEC    EQU    RTCBAS+2    ;Seconds port
  133. RTCMIN    EQU    RTCBAS+3    ;Minutes port
  134. RTCHOR    EQU    RTCBAS+4    ;Hour port
  135. RTCDWK    EQU    RTCBAS+5    ;Day of Week port (1=Mon 7=Sun)
  136. RTCDAY    EQU    RTCBAS+6    ;Day port
  137. RTCMON    EQU    RTCBAS+7    ;Month port
  138. RTCYER    EQU    RTCBAS+9    ;Year port
  139. ;-----------------------------------------
  140. ; 8250 UART control and bit definitions
  141. ;-----------------------------------------
  142. B8250.1    EQU    0D0H
  143. B8250.2    EQU    0D8H
  144. B8250.3    EQU    0E0H
  145. RBR    EQU    0        ;Reciever Buffer Register
  146. THR    EQU    0        ;Transmitter Holding Register
  147. DLL    EQU    0        ;Divisor Latch Address (LSB)
  148. DLM    EQU    1        ;Divisor Latch Address (MSB)
  149. INTER    EQU    1        ;Interrupt Enable Register
  150. INTIR    EQU    2        ;Interrupt ID Register
  151. LINCR    EQU    3        ;Line Control Register
  152. MODCR    EQU    4        ;Modem Control Register
  153. LINSR    EQU    5        ;Line Status Register
  154. MODSR    EQU    6        ;Modem Status Register
  155. UCLOO    EQU    00010000B    ;Enable Loop-Back
  156. RTSDTR    EQU    00000011B    ;RTS + DTR bits
  157. UCDLA    EQU    10000000B    ;Order Divisor Latch Access
  158. ;-----------------------------------------
  159. ; 2661 EPCI control and bit definitions
  160. ;-----------------------------------------
  161. b2661    equ    0d8h        ;Port base address for 2661 EPCI
  162. epdat    equ    0        ;Data register (Read / Write)
  163. epsr    equ    1        ;Status register (Read)
  164. epmr1    equ    2        ;Mode register 1 (Write)
  165. epmr2    equ    2        ;Mode register 2 (Write)
  166. epcr    equ    3        ;Command register (Read / Write)
  167. ep.int    equ    4        ;Interrupt port
  168. epcmd    equ    00110111b    ;Normal operating command    (37H)
  169. mr1.nml    equ    01001110b    ;Mode register 1 normal         (4EH)
  170. mr2.05    equ    01110000b    ;Mode register 2 - 50 baud   (70H)
  171. mr2.11    equ    01110010b    ;Mode register 2 - 110 baud  (72H)
  172. mr2.3    equ    01110101b    ;Mode register 2 - 300 baud  (75H)
  173. mr2.6    equ    01110110b    ;mode register 2 - 600 baud  (76H)
  174. mr2.12    equ    01110111b    ;Mode register 2 - 1200 baud (77H)
  175. mr2.24    equ    01111010b    ;Mode register 2 - 2400 baud (7AH)
  176. mr2.48    equ    01111100b    ;Mode register 2 - 4800 baud (7CH)
  177. mr2.96    equ    01111110b    ;Mode register 2 - 9600 baud (7EH)
  178. mr2.192    equ    01111111b    ;Mode register 2 - 19200 baud (7FH)
  179. ;-----------------------------------------
  180. ; Misc CP/M and H-89 equates
  181. ;-----------------------------------------
  182. BDOS05    EQU    0005H        ;BDOS entry CALL vector address
  183. TOPUSR    EQU    0006H        ;Top of user memory (BDOS base)
  184. TICCNT    EQU    000BH        ;CP/M 2 mSec clock byte
  185. CBYTE    EQU    000DH        ;CP/M control byte
  186. INTLV5    EQU    0028H        ;Level 5 interrupt vector
  187. TPDRV    EQU    0050H        ;Drive TPA was loaded from
  188. FCB    EQU    005CH        ;BDOS File Control Block Address
  189. IOBUFF    EQU    0080H        ;BDOS DMA I/O Buffer Address
  190. TIC.SC2    EQU    500        ;500 tics of the 2mSec clock/second
  191.