home *** CD-ROM | disk | FTP | other *** search
- ;==========================================================================;
- ; Control block layout for each port -- Just labels to provide a structure ;
- ; ;
- ; Copyright 1986, 1987, 1988, 1990 by H. Roy Engehausen. All rights ;
- ; reserved. ;
- ; ;
- ; This software may be freely distributed and used, but it may not ;
- ; under any circumstances be sold by anyone other than the author. ;
- ; It may be distributed by a commercial company as long as it is ;
- ; for no cost. ;
- ; ;
- ;==========================================================================;
-
- ORG 0
-
- com_block_beg LABEL BYTE ; Start of com_block
-
- com_next DW ? ; Offset of next comm block
-
- buffer_r_a DW ? ; Segment of current receive buffer
- buffer_t_a DW ? ; Segment of current transmit buffer
-
- comnumber DB ? ; Comm number - 1
-
- chip DB ? ; Chip type
- chip_nu EQU 0 ; Slot not used
- chip_8250 EQU 1 ; 8250 - IBM ASYNC board
- chip_8251 EQU 2 ; 8251 - IBM BSC board in ASYNC mode
- chip_8530 EQU 3 ; 8530 - PACCOMM PC-100 board
- chip_qrqp EQU 4 ; QUADRAM QuadPort
- chip_4apc EQU 5 ; 4 async port card
-
- chip_comm DW ? ; Offset to common chip info
-
- flags DB ? ; Flag byte
- flags_tbe EQU 10000000B ; Transmit buffer empty expected
- flags_dcd_on EQU 01000000B ; DCD on
- flags_xmt_on EQU 00100000B ; Transmitter on
- flags_xmt_h EQU 00010000B ; Transmitter held
- ; EQU ....x...B ; Not used
- flags_was_e EQU 00000100B ; Buffer was empty at start
- flags_useoff EQU 00000010B ; User wants handshake off
- flags_in_use EQU 00000001B ; Block in use
-
- options DB ? ; Option byte
- opt_fifo EQU 10000000B ; FIFO mode in use
- opt_high_irq EQU 01000000B ; IRQ8-F used
- opt_high EQU 00100000B ; High speed option
- opt_fd EQU 00010000B ; Full duplex link
- opt_igerr EQU 00001000B ; Ignore incoming packets in error
- opt_hdwhs EQU 00000100B ; Hardware handshaking desired
- opt_brktr EQU 00000010B ; Translate break to 3 control "C"
- opt_trbuf EQU 00000001B ; Transmit buffer enabled.
-
- data_rate DB ? ; Data rate for this line
- last_rs DB ? ; Last receive status
- hiv DB ? ; Hardware interrupt vector number
- baseaddr DW ? ; Base port address
- int_mask DB ? ; Interrupt chip mask
- buffer_r_in DW ? ; Receive buffer in offset
- buffer_r_out DW ? ; Receive buffer out offset
- buffer_t_in DW ? ; Transmit buffer in offset
- buffer_t_out DW ? ; Transmit buffer out offset
-
- ;--------------------------------------------------------------------------;
- ; This is the variable section of the COM Block -- 8530 ;
- ;--------------------------------------------------------------------------;
-
- buffer_r_seg DW ? ; Receive buffer segment (8530 KISS mode)
- buffer_t_seg DW ? ; Transmit buffer segment (8530 KISS mode)
-
- timer_dcd DW ? ; Time since DCD
- timer_xmtr DW ? ; Time since last transmit event
-
- period_xmtr DB ? ; Number of transmit event in progress
- period_x_txd EQU 0 ; TXD in progress
- period_x_tx EQU 2 ; Transmitter sending data
- period_x_crc EQU 4 ; Awaiting end of CRC
-
- value_p DB ? ; P-persistance -- All times in clock
- value_slot DB ? ; Slot time ticks
- value_txd DW ? ; TXD
- value_crc DW ? ; CRC wait
-
- clock_8530 DW ? ; Clock rate in Khz
-
- type_8530 DB ? ; 8530 card type
- type_8530_a EQU 0 ; PACCOMM Type "A" card
- type_8530_b EQU 1 ; PACCOMM Type "B" card
-
- kiss_type DB kiss_escape ; Host->TNC kiss packet type
- ; Uses the first byte after FEND
-
- kiss_flag DB 0 ; KISS flags
- kiss_t_valid EQU 10000000B ; Type is valid
- kiss_r_fesc EQU 01000000B ; FESC from host
- ; Use 2 bits for KISS - R mode.
- ; This is used directly for a branch table
- kiss_r_mode EQU 00000110B ; KISS receive packet mode
- kiss_r_mfs EQU 00000000B ; Send KISS FEND to start a packet
- kiss_r_mtype EQU 00000010B ; Send KISS type
- kiss_r_mdata EQU 00000100B ; Send KISS data
- kiss_r_mfe EQU 00000110B ; Send KISS FEND to end a packet
-
- ;--------------------------------------------------------------------------;
- ; COMBLOCK size ;
- ;--------------------------------------------------------------------------;
-
- com_size EQU $-com_block_beg ; Length of com_block
-
- ;==========================================================================;
- ; Tie blocks ;
- ;==========================================================================;
-
- ORG 0 ;
-
- tie_block LABEL BYTE ;
- tie_size = 0 ;
-
- ;--------------------------------------------------------------------------;
- ; Tie block for 8530 ;
- ;--------------------------------------------------------------------------;
-
- IF present_8530
-
- tie2_a DW ? ; --> "A" channel com_blovk
- tie2_b DW ? ; --> "B" channel com_blovk
- tie2_modem DB ? ; Modem control byte
- tie2_clock DB ? ; "B" XTAL initialize switch
-
- tie2_size EQU $-tie_block ;
-
- IF (tie2_size GT tie_size)
- tie_size = tie2_size
- ENDIF
-
- ENDIF
-
- ;--------------------------------------------------------------------------;
- ; Tie block for QUADRAM Quadport or the 4 async port card ;
- ; Note: a word of zeros terminates the list ;
- ;--------------------------------------------------------------------------;
-
- IF present_qrqp
-
- tie3_a DW ? ; --> "A" channel com_block
- tie3_b DW ? ; --> "B" channel com_block
- tie3_c DW ? ; --> "C" channel com_block
- tie3_d DW ? ; --> "D" channel com_block
- tie3_e DW ? ; --> "E" channel com_block
- tie3_f DW ? ; --> "F" channel com_block
- tie3_g DW ? ; --> "G" channel com_block
-
- tie3_size EQU $-tie_block ;
-
- IF (tie3_size GT tie_size)
- tie_size = tie3_size
- ENDIF
-
- ENDIF