home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / CDOSDSK4.ZIP / CDOSDSK4.TD0 / XIOS / XIOS.EQU < prev   
Encoding:
Text File  |  1989-01-26  |  12.1 KB  |  355 lines

  1.  
  2. ; XIOS.EQU
  3.  
  4. ; Flag to gen a QXM system:
  5.  
  6. ;QXM        equ    TRUE
  7. QXM        equ    FALSE
  8.  
  9. ;********************************************************
  10. ;*    Definition of XIOS FLAGS used in this system:    *
  11. ;********************************************************
  12.  
  13. FDC_FLAG    equ    4        ; floppy operation-done flag
  14. CI_FLAG        equ    5        ; console in flag
  15. WW_FLAG        equ    6        ; window manager flag
  16. ER_FLAG        equ    7        ; get errror response
  17. HD_FLAG        equ    8        ; hard disk operation-done flag
  18.  
  19. LAST_FLAG    equ    HD_FLAG+1
  20.  
  21.  
  22. ;********************************************************
  23. ;*        KEYBOARD and PFK constants:        *
  24. ;********************************************************
  25.  
  26. PFK_L_SIZE    equ    20        ; chars per pfk in low table
  27. PFK_H_SIZE    equ     4        ; chars per pfk in high table
  28. LOW_PFKS    equ    10        ; number of 20 char pfk codes
  29. HIGH_PFKS    equ    40        ; number of 4 char pfk codes
  30.  
  31.  
  32. ;********************************
  33. ;    DISK DATA BUFFERS    *
  34. ;********************************
  35.  
  36. DAT_BUFFS    equ    4        ; # of data buffers
  37. DAT_PER_PROC    equ    4        ; # per process
  38.  
  39. ;********************************
  40. ;    MEMORY ALLOCATION    *
  41. ;********************************
  42.  
  43. MIN_PART_LEN    equ    80h        ; minimum paragraph size of an
  44.                     ; INIT-trimmed memory partition
  45. eject
  46.  
  47. ;********************************************************
  48. ;*    Auxiliary input/output constant equates        *
  49. ;********************************************************
  50.  
  51. ; These internal program values are mostly hardware independent:
  52.  
  53. NUM_AUX_PORTS    equ    (1+8)        ; the maximum we support:
  54.                     ; COM1 (+ COM2)        -or-
  55.                     ; COM1 + 4-port card    -or-
  56.                     ; COM1 + 8-port card    -or-
  57.  
  58. AUXIN_BUF_SIZE    equ    512        ; size of the receive buffer
  59. A_FEW        equ    32        ; time for protocol turn around
  60. AUX_STACK_SIZE    equ    64        ; interrupt stack size
  61. AUXOUT_BUF_SIZE    equ    64        ; size of the transmit buffer
  62. CONIN_BUF_SIZE    equ    64        ; small input buffer for PIN
  63. CONOUT_BUF_SIZE    equ    256        ; large output buffer for 38.4 KBd
  64. POLL_COUNT    equ    3        ; how many times to hard poll before
  65.                     ;  calling the sup. (serial-out)
  66.                     ;  (not used w/ int-dr. ser. out)
  67.  
  68. ;************************
  69. ; For SUN RIVER system
  70. ;************************
  71. NUM_SR_PORTS    equ    4*3        ; extra for SUN River terminals
  72.                     ; 1 main console + 2 COM ports
  73.                     ; for 4 stations.
  74.  
  75.  
  76. ;********************************************************************
  77. ;
  78. ;    XIOS SERIAL PORT (AUXILIARY) DATA BLOCK FORMAT:
  79. ;
  80. ;    Each auxiliary port has associated with it two data blocks which
  81. ;    contain information pertinent to the operation of the aux
  82. ;    routines themselves and their associated interrupt routines.
  83.  
  84. ;    The INPUT and OUTPUT blocks are outlined below:
  85.  
  86. ;           +----------+----------+
  87. ;      bx+0 |    aux_buf_count    |   Number of characters in the buffer
  88. ;           +----------+----------+
  89. ;        +2 |     aux_in_ptr      |   Points to next available cell
  90. ;           +----------+----------+
  91. ;        +4 |     aux_out_ptr     |   Points to next valid character
  92. ;           +----------+----------+
  93. ;        +6 |    aux_buf_base     |   Starting segment of this buffer
  94. ;           +----------+----------+
  95. ;        +8 |     aux_buf_top     |   Last usable offset of this buffer
  96. ;           +----------+----------+
  97. ;       +10 |    aux_port_addr    |   Hardware address of this port
  98. ;           +----------+----------+
  99. ;       +12 | aux_flag | aux_wait |   Flag number and wait semaphore
  100. ;           +----------+----------+
  101. ;       +14 | aux_prot | aux_xchr |   Protocol type and xon/xoff char
  102. ;           +----------+----------+
  103. ;    +16 |    irq latch ptr    |   IRQ latch data for multi-port cards
  104. ;        +----------+----------+
  105. ;    +18 | on char  | off char |   The on/off chars for xon/xoff char
  106. ;        +----------+----------+
  107.  
  108. AUX_BUF_COUNT    equ    word ptr 0
  109. AUX_IN_PTR    equ    word ptr 2
  110. AUX_OUT_PTR    equ    word ptr 4
  111. AUX_BUF_BASE    equ    word ptr 6
  112. AUX_BUF_TOP    equ    word ptr 8
  113. AUX_PORT_ADDR    equ    word ptr 10
  114. AUX_FLAG    equ    byte ptr 12
  115. AUX_WAIT    equ    byte ptr 13
  116. AUX_PROT    equ    byte ptr 14
  117. AUX_XCHR    equ    byte ptr 15
  118. AUX_LATCH    equ    word ptr 16
  119. AUX_ON        equ    byte ptr 18
  120. AUX_OFF        equ    byte ptr 19
  121.  
  122. eject
  123.  
  124. ; Protocol constants:
  125.  
  126. DTR_DSR        equ    01h    ; bit for dsr/dtr protocol
  127. RTS_CTS        equ    02h    ; bit for rts/cts protocol
  128. XON_XOFF    equ    04h    ; bit for xon/xoff protocol
  129. OFF_BIT        equ    80h    ; recieve protocol is now off
  130.  
  131. PROT_R_INIT    equ    DTR_DSR                ; initial receive
  132. PROT_T_INIT    equ    DTR_DSR             ; initial transmit
  133.  
  134. ; Multi port card support equates:
  135.  
  136. MU_PORT        equ    word ptr 0    ; base port address to check (0 = none)
  137. MU_NPORTS    equ    word ptr 2    ; 1/2/4/8 ports per card
  138. MU_LATCH    equ    word ptr 4    ; IRQ latch port (0 = none)
  139. MU_XOR_AND    equ    word ptr 6    ; mask & polarity of IRQ latch bits
  140. MU_RESET    equ    word ptr 8    ; reset port (0 = none)
  141. MU_RESDAT    equ    word ptr 10    ; reset r/w flag and bit pattern
  142. MU_CONFIG    equ    byte ptr 12    ; baud rates/parity/stop/word length
  143. MU_PROT        equ    byte ptr 20    ; input/output protocol for 8 ports
  144. MU_CONAUX    equ    byte ptr 28    ; bit map, 0 = CON, 1 = AUX/PRN
  145. MU_RESVD    equ    byte ptr 29    ; reserve 3 bytes - total is 32 byte
  146.  
  147. eject
  148. ;************************************************
  149. ;*                        *
  150. ;*        SCREEN PARAMETERS        *
  151. ;*                        *
  152. ;************************************************
  153. NUM_VIR_CONS    equ    4    ;number of virtual consoles
  154.  
  155. SL_MONO_BIT    equ    01h    ;if status goes to monochrome
  156. SL_COLOR_BIT    equ    02h    ;if status goes to color
  157.  
  158. IN_SYNC        equ    01h
  159. OUT_SYNC    equ    02h
  160.  
  161. CRT_ROWS_C    equ    24    ; crt height for CP/M  w/ stat line
  162. CRT_ROWS_P    equ    25    ; crt height for PC DOS  w/o stat line
  163. CRT_COLS    equ    80    ; crt width
  164.  
  165. S_L_OFFSET    equ    CRT_ROWS_C * CRT_COLS    ; status line offset
  166. BUFFER_SIZE    equ    CRT_ROWS_P * CRT_COLS * (NUM_VIR_CONS*2 + 1)
  167.                 ; this allows 2x bytes for each
  168.                 ; console and 1x for the map
  169.  
  170. NEG4        equ    -4    ; for reverse indexing
  171.  
  172. BOX_ATTRIB    equ    07h    ; normal wh. on bl. for signon box
  173.  
  174. ;    virtual console structure definition
  175.  
  176. VS_ANSI_SIZE    equ    16        ; Maximum of 16 Characters
  177.  
  178. VS_CURSOR    equ    word ptr 0[bx]        ; cursor row,column
  179. VS_CUR_COL    equ    byte ptr 0[bx]
  180. VS_CUR_ROW    equ    byte ptr 1[bx]
  181. VS_TOP_LEFT    equ    word ptr 2[bx]        ; t l window corner
  182. VS_LEFT        equ    byte ptr 2[bx]
  183. VS_TOP        equ    byte ptr 3[bx]
  184. VS_BOT_RIGHT    equ    word ptr 4[bx]        ; b r window corner
  185. VS_RIGHT    equ    byte ptr 4[bx]
  186. VS_BOTTOM    equ    byte ptr 5[bx]
  187. VS_OLD_T_L    equ    word ptr 6[bx]        ; last t l corner
  188. VS_OLD_B_R    equ    word ptr 8[bx]        ; last b r corner
  189. VS_CRT_SIZE    equ    word ptr 10[bx]        ; total rows, columns
  190. VS_WIN_SIZE    equ    word ptr 12[bx]        ; including invisible
  191. VS_VIEW_POINT    equ    word ptr 14[bx]        ; window top left
  192. VS_ROWS        equ    word ptr 16[bx]        ; window row count
  193. VS_ROWSB    equ    byte ptr 16[bx]
  194. VS_COLS        equ    word ptr 18[bx]        ; window column count
  195. VS_COLSB    equ    byte ptr 18[bx]
  196. VS_CORRECT    equ    word ptr 20[bx]        ; char position factor
  197. VS_VC_SEG    equ    word ptr 22[bx]        ; vc map base segment
  198. VS_CRT_SEG    equ    word ptr 24[bx]        ; base of screen memory
  199. VS_LIST_PTR    equ    word ptr 26[bx]        ; start of row updates
  200. VS_ATTRIB    equ    byte ptr 28[bx]        ; current char attrib
  201. VS_MODE        equ    byte ptr 29[bx]        ; wrap, cursor on/off
  202. VS_CUR_TRACK    equ    byte ptr 30[bx]        ; cursor tracking mode
  203. VS_WIDTH    equ    byte ptr 31[bx]        ; wrap width
  204. VS_NUMBER    equ    byte ptr 32[bx]        ; virt console num
  205. VS_BIT        equ    byte ptr 33[bx]        ; vc num = bit pos
  206. VS_SAVE_CURSOR    equ    word ptr 34[bx]        ; cursor save loc
  207. VS_VECTOR    equ    word ptr 36[bx]        ; console state vector
  208. VS_XLAT        equ    word ptr 38[bx]        ; mono/color xlat table
  209. VS_CRT_ROWS    equ    byte ptr 40[bx]        ; 24 (cpm) or 25 (pc)
  210. VS_PC_SHIFTS    equ    byte ptr 41[bx]        ; pc mode shift state
  211. VS_TRUE_VIEW    equ    word ptr 42[bx]        ; corrected view point
  212. VS_TRUE_COL    equ    byte ptr 42[bx]
  213. VS_TRUE_ROW    equ    byte ptr 43[bx]
  214. VS_CUR_TYPE    equ    word ptr 44[bx]        ; mono or color
  215. VS_PFK_TBL    equ    word ptr 46[bx]        ; prog func key base
  216. VS_PFK_PTR    equ    word ptr 48[bx]        ; pointer to pfk table
  217. VS_PFK_COUNT    equ    byte ptr 50[bx]        ; pfk count down
  218. VS_PFK_EXP    equ    byte ptr 51[bx]        ; pfk expansion flag
  219. VS_MX        equ    byte ptr 52[bx]        ; mutual exclusion sema
  220. VS_BACK_COUNT    equ    byte ptr 53[bx]        ; XIOS back door count
  221. VS_BACK_AX    equ    word ptr 54[bx]        ; ax for XIOS back door
  222. VS_BACK_BX    equ    word ptr 56[bx]
  223. VS_BACK_CX    equ    word ptr 58[bx]
  224. VS_BACK_DX    equ    word ptr 60[bx]
  225. VS_SCREEN_MODE    equ    byte ptr 62[bx]        ; alpha/graphics mode
  226. VS_SCREEN_SAVE    equ    byte ptr 63[bx]        ; saves the old mode
  227. VS_OFFSET    equ    word ptr 64[bx]
  228. VS_COLORSEL    equ    byte ptr 66[bx]        ; = CGA color-select reg. contents
  229. VS_SCRATCH    equ    word ptr 67[bx]        ; a scratch area to help with
  230.                         ;   reentrancy
  231. VS_CONMODE    equ    byte ptr 69[bx]        ; Suspend flag
  232. VS_CUR_TYPE_HW    equ    word ptr 70[bx]        ; what actually goes to the
  233. ;                        ;  CRTC ports
  234. VS_HERC_MODE    equ    byte ptr 72[bx]        ; hercules mode 
  235. ;
  236. VS_MODE1    equ    byte ptr 73[bx]        ; EGA toggle blink state etc..
  237. VS_PALLETTE    equ    byte ptr 74[bx]        ; Pallette save area
  238. VS_PC_EQUIP    equ    word ptr 91[bx]        ; PC equipment word
  239. VS_ANSI_COUNT    equ    word ptr 93[bx]        ; Options Count
  240. VS_ANSI_BUF    equ    byte ptr 95[bx]        ; 16 byte buffer for ansi strings
  241. VS_CRT_IDX    equ    byte ptr 111[bx]    ; virtual port 3?4h
  242. VS_CRT_DATA    equ    byte ptr 112[bx]    ; virtual port 3?5h
  243. VS_CRT_STAT    equ    byte ptr 132[bx]    ; virtual port 3?Ah
  244.  
  245. SIZE_VS        equ    133
  246.  
  247. ; VS_MODE bit definitions:
  248.  
  249. WRAP_BIT    equ    01h        ; wrap mode enabled
  250. CURSOR_BIT    equ    02h        ; cursor displayed
  251. REV_BIT        equ    04h        ; reverse video mode
  252. SYNC_BIT    equ    08h        ; sync crt accesses
  253. MATCH_BIT    equ    10h        ; image matches physical
  254. PCMODE_BIT    equ    20h        ; pc mode for console & keyboard
  255. ESC_BIT        equ    40h        ; in escape handler
  256. UPDATE_BIT    equ    80h        ; cursor has been moved
  257.  
  258. INIT_MODE    equ    WRAP_BIT + CURSOR_BIT + MATCH_BIT
  259.  
  260. ; VS_MODE1 bit definitions:
  261.  
  262. BLINK_TOGGLE    equ    01h        ; blink toggle bit
  263. LINE_43_MODE    equ    02h        ; 43 line mode enable bit
  264. SUSPEND_STATE    equ    04h        ; original suspend state for graphics
  265.  
  266. ;    CCB Console Attributes
  267. ;
  268. CA_25LINES    equ    02h        ; Supports 25 line operation
  269. CA_ANSI        equ    04h        ; Supports ANSI Control Codes
  270. CA_ROS        equ    08h        ; Provides ROS emulation
  271. CA_HARDWARE    equ    10h        ; PC Hardware Compatible
  272. CA_GR        equ    80h        ; Graphics Suspend Flag
  273. eject
  274.  
  275. ;********************************************************
  276. ;*                            *
  277. ;*        PCDOS Video Support            *
  278. ;*                            *
  279. ;********************************************************
  280.  
  281. ;    PARAMETER BLOCK DEFINITION
  282.  
  283. ;    VID (VIDeo command block) passes registers to some subfunctions.
  284. ;    The registers pass different parameters to different subfunctions.
  285. ;    These definitions are also used to index the parameters when
  286. ;    they are put on the stack.
  287.  
  288. VID_AX        equ    word ptr 0    ; ax register
  289. VID_AL        equ    byte ptr 0
  290. VID_AH        equ    byte ptr 1
  291. VID_BX        equ    word ptr 2    ; bx register
  292. VID_BL        equ    byte ptr 2
  293. VID_BH        equ    byte ptr 3
  294. VID_CX        equ    word ptr 4    ; cx register
  295. VID_CL        equ    byte ptr 4
  296. VID_CH        equ    byte ptr 5
  297. VID_DX        equ    word ptr 6    ; dx register
  298. VID_DL        equ    byte ptr 6
  299. VID_DH        equ    byte ptr 7
  300. VID_VCONS    equ    byte ptr 8    ; virtual console number
  301. VID_BP        equ    word ptr 10    ; bp register
  302. VID_ES        equ    word ptr 12    ; ES register
  303. VID_TEMP    equ    word ptr 14
  304. VID_SI        equ    word ptr 16
  305. ;************************************************
  306. ;*                        *
  307. ;*    IO_DEVIO (BLOCK CHARACTER I/O)        *
  308. ;*        PARAMETER BLOCK            *
  309. ;*                        *
  310. ;************************************************
  311.  
  312. DEV_OFF_BP    equ    word ptr 6[bp]
  313. DEV_SEG_BP    equ    word ptr 8[bp]
  314.  DEV_BUF_BP    equ    dword ptr DEV_OFF_BP
  315. DEV_CNT_BP    equ    word ptr 10[bp]
  316. DEV_TYP_BP    equ    word ptr 12[bp]
  317.  
  318.  
  319. ;************************************************
  320. ;*                        *
  321. ;*    COMMAND LINE HISTORY BUFFER SIZES    *
  322. ;*                        *
  323. ;************************************************
  324.  
  325. ; In paragraphs:
  326.  
  327. HIST_PROG_SIZE    equ    15        ; Shared among all cons
  328. HIST_COMM_SIZE    equ    35        ; Shared among 4 vcs
  329. HIST_SER_SIZE    equ     7        ; One for each serial console
  330. ; Total of 1K.
  331.  
  332. ; How many interrupt vectors to save for LOADCCPM:
  333. NUM_SAVED_VECTORS    equ    78h
  334.  
  335. ;********************************
  336. ;*                *
  337. ;*    SETUP DEFINITION BITS    *
  338. ;*                *
  339. ;********************************
  340.  
  341. ;su_flag_bits$
  342. HERC_ENABLE_BIT    equ    00000001b    ; enable hercules retrace timing
  343. AUTO_EGA_BIT    equ    00000010b    ; autoswitch card installed
  344. EEMS_ENABLE_BIT    equ    00000100b    ; check for EEMS cards bit
  345. A000_VIDEO    equ    00001000b    ; running with video at A000h
  346.  
  347. ; Setup byte Bit definitions - su_mu_vs$
  348. VTERM_EMU    equ    80h        ; Video monitor
  349. PCTERM_EMU    equ    40h        ; PC terminal
  350. DTERM_EMU    equ    20h        ; Dumb terminal
  351. ENHANCED    equ    10h        ; 84/102 key keyboard
  352. NAT_MODE    equ    08h        ; National/US keyboard
  353.  
  354. ;END OF XIOS.EQU
  355.