home *** CD-ROM | disk | FTP | other *** search
-
- ; XIOS.EQU
-
- ; Flag to gen a QXM system:
-
- ;QXM equ TRUE
- QXM equ FALSE
-
- ;********************************************************
- ;* Definition of XIOS FLAGS used in this system: *
- ;********************************************************
-
- FDC_FLAG equ 4 ; floppy operation-done flag
- CI_FLAG equ 5 ; console in flag
- WW_FLAG equ 6 ; window manager flag
- ER_FLAG equ 7 ; get errror response
- HD_FLAG equ 8 ; hard disk operation-done flag
-
- LAST_FLAG equ HD_FLAG+1
-
-
- ;********************************************************
- ;* KEYBOARD and PFK constants: *
- ;********************************************************
-
- PFK_L_SIZE equ 20 ; chars per pfk in low table
- PFK_H_SIZE equ 4 ; chars per pfk in high table
- LOW_PFKS equ 10 ; number of 20 char pfk codes
- HIGH_PFKS equ 40 ; number of 4 char pfk codes
-
-
- ;********************************
- ; DISK DATA BUFFERS *
- ;********************************
-
- DAT_BUFFS equ 4 ; # of data buffers
- DAT_PER_PROC equ 4 ; # per process
-
- ;********************************
- ; MEMORY ALLOCATION *
- ;********************************
-
- MIN_PART_LEN equ 80h ; minimum paragraph size of an
- ; INIT-trimmed memory partition
- eject
-
- ;********************************************************
- ;* Auxiliary input/output constant equates *
- ;********************************************************
-
- ; These internal program values are mostly hardware independent:
-
- NUM_AUX_PORTS equ (1+8) ; the maximum we support:
- ; COM1 (+ COM2) -or-
- ; COM1 + 4-port card -or-
- ; COM1 + 8-port card -or-
-
- AUXIN_BUF_SIZE equ 512 ; size of the receive buffer
- A_FEW equ 32 ; time for protocol turn around
- AUX_STACK_SIZE equ 64 ; interrupt stack size
- AUXOUT_BUF_SIZE equ 64 ; size of the transmit buffer
- CONIN_BUF_SIZE equ 64 ; small input buffer for PIN
- CONOUT_BUF_SIZE equ 256 ; large output buffer for 38.4 KBd
- POLL_COUNT equ 3 ; how many times to hard poll before
- ; calling the sup. (serial-out)
- ; (not used w/ int-dr. ser. out)
-
- ;************************
- ; For SUN RIVER system
- ;************************
- NUM_SR_PORTS equ 4*3 ; extra for SUN River terminals
- ; 1 main console + 2 COM ports
- ; for 4 stations.
-
-
- ;********************************************************************
- ;
- ; XIOS SERIAL PORT (AUXILIARY) DATA BLOCK FORMAT:
- ;
- ; Each auxiliary port has associated with it two data blocks which
- ; contain information pertinent to the operation of the aux
- ; routines themselves and their associated interrupt routines.
-
- ; The INPUT and OUTPUT blocks are outlined below:
-
- ; +----------+----------+
- ; bx+0 | aux_buf_count | Number of characters in the buffer
- ; +----------+----------+
- ; +2 | aux_in_ptr | Points to next available cell
- ; +----------+----------+
- ; +4 | aux_out_ptr | Points to next valid character
- ; +----------+----------+
- ; +6 | aux_buf_base | Starting segment of this buffer
- ; +----------+----------+
- ; +8 | aux_buf_top | Last usable offset of this buffer
- ; +----------+----------+
- ; +10 | aux_port_addr | Hardware address of this port
- ; +----------+----------+
- ; +12 | aux_flag | aux_wait | Flag number and wait semaphore
- ; +----------+----------+
- ; +14 | aux_prot | aux_xchr | Protocol type and xon/xoff char
- ; +----------+----------+
- ; +16 | irq latch ptr | IRQ latch data for multi-port cards
- ; +----------+----------+
- ; +18 | on char | off char | The on/off chars for xon/xoff char
- ; +----------+----------+
-
- AUX_BUF_COUNT equ word ptr 0
- AUX_IN_PTR equ word ptr 2
- AUX_OUT_PTR equ word ptr 4
- AUX_BUF_BASE equ word ptr 6
- AUX_BUF_TOP equ word ptr 8
- AUX_PORT_ADDR equ word ptr 10
- AUX_FLAG equ byte ptr 12
- AUX_WAIT equ byte ptr 13
- AUX_PROT equ byte ptr 14
- AUX_XCHR equ byte ptr 15
- AUX_LATCH equ word ptr 16
- AUX_ON equ byte ptr 18
- AUX_OFF equ byte ptr 19
-
- eject
-
- ; Protocol constants:
-
- DTR_DSR equ 01h ; bit for dsr/dtr protocol
- RTS_CTS equ 02h ; bit for rts/cts protocol
- XON_XOFF equ 04h ; bit for xon/xoff protocol
- OFF_BIT equ 80h ; recieve protocol is now off
-
- PROT_R_INIT equ DTR_DSR ; initial receive
- PROT_T_INIT equ DTR_DSR ; initial transmit
-
- ; Multi port card support equates:
-
- MU_PORT equ word ptr 0 ; base port address to check (0 = none)
- MU_NPORTS equ word ptr 2 ; 1/2/4/8 ports per card
- MU_LATCH equ word ptr 4 ; IRQ latch port (0 = none)
- MU_XOR_AND equ word ptr 6 ; mask & polarity of IRQ latch bits
- MU_RESET equ word ptr 8 ; reset port (0 = none)
- MU_RESDAT equ word ptr 10 ; reset r/w flag and bit pattern
- MU_CONFIG equ byte ptr 12 ; baud rates/parity/stop/word length
- MU_PROT equ byte ptr 20 ; input/output protocol for 8 ports
- MU_CONAUX equ byte ptr 28 ; bit map, 0 = CON, 1 = AUX/PRN
- MU_RESVD equ byte ptr 29 ; reserve 3 bytes - total is 32 byte
-
- eject
- ;************************************************
- ;* *
- ;* SCREEN PARAMETERS *
- ;* *
- ;************************************************
- NUM_VIR_CONS equ 4 ;number of virtual consoles
-
- SL_MONO_BIT equ 01h ;if status goes to monochrome
- SL_COLOR_BIT equ 02h ;if status goes to color
-
- IN_SYNC equ 01h
- OUT_SYNC equ 02h
-
- CRT_ROWS_C equ 24 ; crt height for CP/M w/ stat line
- CRT_ROWS_P equ 25 ; crt height for PC DOS w/o stat line
- CRT_COLS equ 80 ; crt width
-
- S_L_OFFSET equ CRT_ROWS_C * CRT_COLS ; status line offset
- BUFFER_SIZE equ CRT_ROWS_P * CRT_COLS * (NUM_VIR_CONS*2 + 1)
- ; this allows 2x bytes for each
- ; console and 1x for the map
-
- NEG4 equ -4 ; for reverse indexing
-
- BOX_ATTRIB equ 07h ; normal wh. on bl. for signon box
-
- ; virtual console structure definition
-
- VS_ANSI_SIZE equ 16 ; Maximum of 16 Characters
-
- VS_CURSOR equ word ptr 0[bx] ; cursor row,column
- VS_CUR_COL equ byte ptr 0[bx]
- VS_CUR_ROW equ byte ptr 1[bx]
- VS_TOP_LEFT equ word ptr 2[bx] ; t l window corner
- VS_LEFT equ byte ptr 2[bx]
- VS_TOP equ byte ptr 3[bx]
- VS_BOT_RIGHT equ word ptr 4[bx] ; b r window corner
- VS_RIGHT equ byte ptr 4[bx]
- VS_BOTTOM equ byte ptr 5[bx]
- VS_OLD_T_L equ word ptr 6[bx] ; last t l corner
- VS_OLD_B_R equ word ptr 8[bx] ; last b r corner
- VS_CRT_SIZE equ word ptr 10[bx] ; total rows, columns
- VS_WIN_SIZE equ word ptr 12[bx] ; including invisible
- VS_VIEW_POINT equ word ptr 14[bx] ; window top left
- VS_ROWS equ word ptr 16[bx] ; window row count
- VS_ROWSB equ byte ptr 16[bx]
- VS_COLS equ word ptr 18[bx] ; window column count
- VS_COLSB equ byte ptr 18[bx]
- VS_CORRECT equ word ptr 20[bx] ; char position factor
- VS_VC_SEG equ word ptr 22[bx] ; vc map base segment
- VS_CRT_SEG equ word ptr 24[bx] ; base of screen memory
- VS_LIST_PTR equ word ptr 26[bx] ; start of row updates
- VS_ATTRIB equ byte ptr 28[bx] ; current char attrib
- VS_MODE equ byte ptr 29[bx] ; wrap, cursor on/off
- VS_CUR_TRACK equ byte ptr 30[bx] ; cursor tracking mode
- VS_WIDTH equ byte ptr 31[bx] ; wrap width
- VS_NUMBER equ byte ptr 32[bx] ; virt console num
- VS_BIT equ byte ptr 33[bx] ; vc num = bit pos
- VS_SAVE_CURSOR equ word ptr 34[bx] ; cursor save loc
- VS_VECTOR equ word ptr 36[bx] ; console state vector
- VS_XLAT equ word ptr 38[bx] ; mono/color xlat table
- VS_CRT_ROWS equ byte ptr 40[bx] ; 24 (cpm) or 25 (pc)
- VS_PC_SHIFTS equ byte ptr 41[bx] ; pc mode shift state
- VS_TRUE_VIEW equ word ptr 42[bx] ; corrected view point
- VS_TRUE_COL equ byte ptr 42[bx]
- VS_TRUE_ROW equ byte ptr 43[bx]
- VS_CUR_TYPE equ word ptr 44[bx] ; mono or color
- VS_PFK_TBL equ word ptr 46[bx] ; prog func key base
- VS_PFK_PTR equ word ptr 48[bx] ; pointer to pfk table
- VS_PFK_COUNT equ byte ptr 50[bx] ; pfk count down
- VS_PFK_EXP equ byte ptr 51[bx] ; pfk expansion flag
- VS_MX equ byte ptr 52[bx] ; mutual exclusion sema
- VS_BACK_COUNT equ byte ptr 53[bx] ; XIOS back door count
- VS_BACK_AX equ word ptr 54[bx] ; ax for XIOS back door
- VS_BACK_BX equ word ptr 56[bx]
- VS_BACK_CX equ word ptr 58[bx]
- VS_BACK_DX equ word ptr 60[bx]
- VS_SCREEN_MODE equ byte ptr 62[bx] ; alpha/graphics mode
- VS_SCREEN_SAVE equ byte ptr 63[bx] ; saves the old mode
- VS_OFFSET equ word ptr 64[bx]
- VS_COLORSEL equ byte ptr 66[bx] ; = CGA color-select reg. contents
- VS_SCRATCH equ word ptr 67[bx] ; a scratch area to help with
- ; reentrancy
- VS_CONMODE equ byte ptr 69[bx] ; Suspend flag
- VS_CUR_TYPE_HW equ word ptr 70[bx] ; what actually goes to the
- ; ; CRTC ports
- VS_HERC_MODE equ byte ptr 72[bx] ; hercules mode
- ;
- VS_MODE1 equ byte ptr 73[bx] ; EGA toggle blink state etc..
- VS_PALLETTE equ byte ptr 74[bx] ; Pallette save area
- VS_PC_EQUIP equ word ptr 91[bx] ; PC equipment word
- VS_ANSI_COUNT equ word ptr 93[bx] ; Options Count
- VS_ANSI_BUF equ byte ptr 95[bx] ; 16 byte buffer for ansi strings
- VS_CRT_IDX equ byte ptr 111[bx] ; virtual port 3?4h
- VS_CRT_DATA equ byte ptr 112[bx] ; virtual port 3?5h
- VS_CRT_STAT equ byte ptr 132[bx] ; virtual port 3?Ah
-
- SIZE_VS equ 133
-
- ; VS_MODE bit definitions:
-
- WRAP_BIT equ 01h ; wrap mode enabled
- CURSOR_BIT equ 02h ; cursor displayed
- REV_BIT equ 04h ; reverse video mode
- SYNC_BIT equ 08h ; sync crt accesses
- MATCH_BIT equ 10h ; image matches physical
- PCMODE_BIT equ 20h ; pc mode for console & keyboard
- ESC_BIT equ 40h ; in escape handler
- UPDATE_BIT equ 80h ; cursor has been moved
-
- INIT_MODE equ WRAP_BIT + CURSOR_BIT + MATCH_BIT
-
- ; VS_MODE1 bit definitions:
-
- BLINK_TOGGLE equ 01h ; blink toggle bit
- LINE_43_MODE equ 02h ; 43 line mode enable bit
- SUSPEND_STATE equ 04h ; original suspend state for graphics
-
- ; CCB Console Attributes
- ;
- CA_25LINES equ 02h ; Supports 25 line operation
- CA_ANSI equ 04h ; Supports ANSI Control Codes
- CA_ROS equ 08h ; Provides ROS emulation
- CA_HARDWARE equ 10h ; PC Hardware Compatible
- CA_GR equ 80h ; Graphics Suspend Flag
- eject
-
- ;********************************************************
- ;* *
- ;* PCDOS Video Support *
- ;* *
- ;********************************************************
-
- ; PARAMETER BLOCK DEFINITION
-
- ; VID (VIDeo command block) passes registers to some subfunctions.
- ; The registers pass different parameters to different subfunctions.
- ; These definitions are also used to index the parameters when
- ; they are put on the stack.
-
- VID_AX equ word ptr 0 ; ax register
- VID_AL equ byte ptr 0
- VID_AH equ byte ptr 1
- VID_BX equ word ptr 2 ; bx register
- VID_BL equ byte ptr 2
- VID_BH equ byte ptr 3
- VID_CX equ word ptr 4 ; cx register
- VID_CL equ byte ptr 4
- VID_CH equ byte ptr 5
- VID_DX equ word ptr 6 ; dx register
- VID_DL equ byte ptr 6
- VID_DH equ byte ptr 7
- VID_VCONS equ byte ptr 8 ; virtual console number
- VID_BP equ word ptr 10 ; bp register
- VID_ES equ word ptr 12 ; ES register
- VID_TEMP equ word ptr 14
- VID_SI equ word ptr 16
- ;************************************************
- ;* *
- ;* IO_DEVIO (BLOCK CHARACTER I/O) *
- ;* PARAMETER BLOCK *
- ;* *
- ;************************************************
-
- DEV_OFF_BP equ word ptr 6[bp]
- DEV_SEG_BP equ word ptr 8[bp]
- DEV_BUF_BP equ dword ptr DEV_OFF_BP
- DEV_CNT_BP equ word ptr 10[bp]
- DEV_TYP_BP equ word ptr 12[bp]
-
-
- ;************************************************
- ;* *
- ;* COMMAND LINE HISTORY BUFFER SIZES *
- ;* *
- ;************************************************
-
- ; In paragraphs:
-
- HIST_PROG_SIZE equ 15 ; Shared among all cons
- HIST_COMM_SIZE equ 35 ; Shared among 4 vcs
- HIST_SER_SIZE equ 7 ; One for each serial console
- ; Total of 1K.
-
- ; How many interrupt vectors to save for LOADCCPM:
- NUM_SAVED_VECTORS equ 78h
-
- ;********************************
- ;* *
- ;* SETUP DEFINITION BITS *
- ;* *
- ;********************************
-
- ;su_flag_bits$
- HERC_ENABLE_BIT equ 00000001b ; enable hercules retrace timing
- AUTO_EGA_BIT equ 00000010b ; autoswitch card installed
- EEMS_ENABLE_BIT equ 00000100b ; check for EEMS cards bit
- A000_VIDEO equ 00001000b ; running with video at A000h
-
- ; Setup byte Bit definitions - su_mu_vs$
- VTERM_EMU equ 80h ; Video monitor
- PCTERM_EMU equ 40h ; PC terminal
- DTERM_EMU equ 20h ; Dumb terminal
- ENHANCED equ 10h ; 84/102 key keyboard
- NAT_MODE equ 08h ; National/US keyboard
-
- ;END OF XIOS.EQU
-