Annotation of gcl520h/_gsci.equ, revision 1.1

1.1     ! root        1: ;
        !             2: ;  _GSCI.EQU         5.20A  June 8, 1995
        !             3: ;
        !             4: ;  The Greenleaf Comm Library
        !             5: ;
        !             6: ;  Copyright (C) 1984-1994 Greenleaf Software Inc.  All Rights Reserved.
        !             7: ;
        !             8: ; NOTES
        !             9: ;
        !            10: ;  This file contains all the ASM equates needed for the Level 1
        !            11: ;  ASM files.
        !            12: ;
        !            13: ;  MODIFICATIONS
        !            14: ;
        !            15: ;   December 12, 1992  4.00A : Initial release
        !            16: ;
        !            17: 
        !            18:         if      @DataSize NE 0
        !            19: ptrsize equ     2               ; Number of words in pointer
        !            20:         else
        !            21: ptrsize equ     1
        !            22:         endif
        !            23: 
        !            24: MAX_PORT equ    35
        !            25: ;  Some ASCII symbols
        !            26: NUL     equ     0
        !            27: SOH     equ     1
        !            28: STX     equ     2
        !            29: ETX     equ     3
        !            30: EOT     equ     4
        !            31: ACK     equ     6
        !            32: DLE     equ     10h
        !            33: NAK     equ     15h
        !            34: 
        !            35: ;
        !            36: ; Note: it would be good to get rid of all these definitions and
        !            37: ; replace them with a single include of _8250.equ
        !            38: ;
        !            39: ;  The 8250 port offsets, relative to base (com1, com2, etc.)
        !            40: 
        !            41: BASE    equ     0
        !            42: TXBUF   equ     0               ; Tx Buffer
        !            43: RXBUF   equ     0               ; Rx Buffer
        !            44: BRLSB   equ     0               ; baud rate LSB divisor latch
        !            45: BRMSB   equ     1               ; baud rate MSB
        !            46: INTER   equ     1               ; interrupt enable register
        !            47: INTID   equ     2               ; interrupt ID register
        !            48: FIFOCTL equ     2               ; 16550 FIFI control register
        !            49: LCREG   equ     3               ; line control register
        !            50: MCREG   equ     4               ; modem control reg
        !            51: LSREG   equ     5               ; line status reg
        !            52: MSREG   equ     6               ; modem status reg
        !            53: 
        !            54: ; Equates for bits in the line control register
        !            55: 
        !            56: WLS0    equ     00000001b       ; word length select bit 0
        !            57: WLS1    equ     00000010b       ; word length select bit 1
        !            58: NSB     equ     00000100b       ; number stop bits
        !            59: PAREN   equ     00001000b       ; parity enable
        !            60: PAREVN  equ     00010000b       ; parity even
        !            61: PARSTK  equ     00100000b       ; stick parity
        !            62: SBREAK  equ     01000000b       ; send break
        !            63: DLAB    equ     10000000b       ; set DLAB
        !            64: 
        !            65: ; Equates for bits in Line Status register
        !            66: 
        !            67: DATARDY equ     00000001b       ; data ready
        !            68: OVERRN  equ     00000010b       ; overrun error
        !            69: PARERR  equ     00000100b       ; parity error
        !            70: FRAMERR equ     00001000b       ; framing error
        !            71: RBREAK  equ     00010000b       ; break interrupt (received break)
        !            72: THRE    equ     00100000b       ; transmitter holding reg empty
        !            73: TSRE    equ     01000000b       ; tx shift register empty
        !            74: 
        !            75: ;  Equates for bits in Modem Control register
        !            76: 
        !            77: DTR     equ     00000001b       ; DTR
        !            78: RTS     equ     00000010b       ; RTS
        !            79: OUT1    equ     00000100b       ; aux signal "out1" (not used)
        !            80: OUT2    equ     00001000b       ; ditto "out2"
        !            81: LOOPIT  equ     00010000b       ; loop mode latch
        !            82: 
        !            83: ;  Equates for bits in Modem Status register
        !            84: 
        !            85: DCTS    equ     00000001b       ; delta CTS
        !            86: DDSR    equ     00000010b       ; delta DSR
        !            87: TERI    equ     00000100b       ; trailing edge RI
        !            88: DRLSD   equ     00001000b       ; delta Rx Line Signal Detect
        !            89: CTS     equ     00010000b       ; CTS
        !            90: DSR     equ     00100000b       ; DRS
        !            91: RINGIN  equ     01000000b       ; RI
        !            92: RLSD    equ     10000000b       ; Rx Line Signal Detect
        !            93: 
        !            94: ;  Equates for bits in Interrupt Enable register
        !            95: 
        !            96: ENRX    equ     00000001b       ; enable Data Available int
        !            97: ENTX    equ     00000010b       ; enable Tx Holding Reg Empty int
        !            98: ENRXS   equ     00000100b       ; enable Rx Special Conditions int
        !            99: ENMS    equ     00001000b       ; enable Modem Status Interrupt
        !           100: 
        !           101: ;  chst_bits -- Channel status bits
        !           102: ;
        !           103: ALERT           equ     0000000000000001b  ;any condition needing attention
        !           104: RXEMPTY         equ     0000000000000010b  ;receive buffer empty
        !           105: RXFULL          equ     0000000000000100b  ;receive buffer full
        !           106: RXOVFLOW        equ     0000000000001000b  ;receive buffer overflow
        !           107: TXEMPTY         equ     0000000000010000b  ;transmit buffer empty
        !           108: TXFULL          equ     0000000000100000b  ;transmit buffer full
        !           109: LINERRG         equ     0000000001000000b  ;line error
        !           110: MODCHG          equ     0000000010000000b  ;modem status change
        !           111: XCHRUN          equ     0000000100000000b  ;transmit interrupts are running
        !           112: RCHRUN          equ     0000001000000000b  ;receive interrupts are running
        !           113: TXWXON          equ     0000010000000000b  ;transmit side is waiting for xon
        !           114: TXWCTS          equ     0000100000000000b  ;transmit side is waiting for cts
        !           115: TXWALERT        equ     0001000000000000b  ;transmit side is waiting for alert
        !           116: XOFFSENT        equ     0010000000000000b  ;xoff character has been sent
        !           117: RTSACTIVE       equ     0100000000000000b  ;reflects current state of RTS
        !           118: TXIFLAG         equ     1000000000000000b  ;psuedo interrupt enable bit
        !           119: 
        !           120: ;  chmode_bits  (channel mode bits)
        !           121: ;
        !           122: IS_TXINT        equ     0000000000000001b  ;1 = tx interrupts enabled
        !           123: IS_RXINT        equ     0000000000000010b  ;1 = rx interrupts enabled
        !           124: IS_ASCII        equ     0000000000000100b  ;1 = ascii mode (strip msb)
        !           125: IS_RXERROR      equ     0000000000001000b  ;1 = track errors on each rx char.
        !           126: IS_RX_XOFFMODE  equ     0000000000010000b  ;1 = RX flow control enabled
        !           127: IS_CTSMODE      equ     0000000000100000b  ;1 = cts flow control mode enabled
        !           128: IS_IGALERT      equ     0000000001000000b  ;1 = ignore alert
        !           129: IS_IGDSR        equ     0000000010000000b  ;1 = ignore DSR
        !           130: IS_IGCD         equ     0000000100000000b  ;1 = ignore CD (carrier detect)
        !           131: IS_IGMSTAT      equ     0000001000000000b  ;1 = ignore modem status changes
        !           132: IS_IGRCVER      equ     0000010000000000b  ;1 = ignore receive error condition
        !           133: IS_16550        equ     0000100000000000b  ;1 = This is a 16550 UART
        !           134: IS_BLOCKING     equ     0001000000000000b  ;1 = app wants to force handshake
        !           135: IS_RCHKING      equ     0010000000000000b  ;1 = isrchk enabled
        !           136: IS_RTSCONTROL   equ     0100000000000000b  ;1 = RTS flow control enabled
        !           137: IS_TX_XOFFMODE  equ     1000000000000000b  ;1 = Transmitter XON/XOFF enabled
        !           138: ;  Bit definitions for chkflag (check character flag bits)
        !           139: ;
        !           140: RCHKENABLED     equ     1000000000000000b  ;1 = rchking enabled for character
        !           141: RCHKFLAG        equ     0100000000000000b  ;    set by interrupt routine
        !           142: RCHKVAL         equ     0000001100000000b  ;    determine checking mode
        !           143: RCHKCHAR        equ     0000000011111111b  ;    these bits hold character
        !           144: 
        !           145: ;  The following structure contains all the parameters used by a Tx or
        !           146: ;  Rx process for a given buffer.
        !           147: ;
        !           148: ;  Note:  Pointers pi & po are OFFSET ADDRESSES, NOT RELATIVE TO BOB.
        !           149: ;
        !           150: portst  struc
        !           151:  intrpt_num     dw      ?       ; 8250 Interrupt # (IRQ)
        !           152:  base_8250      dw      ?       ; base i/o address of 8250
        !           153:  p_8250lcr      dw      ?       ; previous 8250 line control register
        !           154:  p_8250mcr      dw      ?       ; previous 8250 modem control register
        !           155:  p_8250ier      dw      ?       ; previous 8250 interrupt enable register
        !           156:  p_8250ldl      dw      ?       ; previous divisor least significant byte
        !           157:  p_8250mdl      dw      ?       ; previous divisor most significant byte
        !           158:  p_vector       dd      ?       ; previous value for interrupt vector
        !           159: 
        !           160:  line_stat      dw      ?       ; line status register
        !           161:  modem_stat     dw      ?       ; modem status register
        !           162:  wide_stat      dw      ?       ; composite status for wide-track buffer
        !           163: 
        !           164:  irq_8259       dw      ?       ; interrupt # in 8259 (com0=4)
        !           165:  saved_8259_bits dw     ?       ; Previous value of irq_8259 bit
        !           166:  port_8259      dw      ?       ; I/O address of 8259
        !           167: 
        !           168:  rx_cell        dw      ?       ; Width of rx buffer
        !           169:  rx_size        dw      ?       ; Size of rx buffer
        !           170:  rx_count       dw      ?       ; Number of characters in receive buffer
        !           171:  rx_head        dw      ?       ; Offset into receive buffer for head
        !           172:  rx_tail        dw      ?       ; Offset into receive buffer for tail
        !           173:                 IFDEF   VGFD
        !           174:  rx_buffer      dw      2 dup(?); This pointer *always* far under VGFD regime
        !           175:                 ELSE
        !           176:  rx_buffer      dw      ptrsize dup(?)
        !           177:                                 ; Always points to base of receive buffer
        !           178:                 ENDIF
        !           179:  tx_cell        dw      ?       ; Width of tx buffer
        !           180:  tx_size        dw      ?       ; Size of tx buffer
        !           181:  tx_count       dw      ?       ; Number of characters in transmit buffer
        !           182:  tx_head        dw      ?       ; Offset into transmit buffer for head
        !           183:  tx_tail        dw      ?       ; Offset into transmit buffer for tail
        !           184: 
        !           185:                 IFDEF   VGFD
        !           186:  tx_buffer      dw      2 dup(?); Always a far ptr under VGFD
        !           187:                 ELSE
        !           188:  tx_buffer      dw      ptrsize dup(?)
        !           189:                                 ; Always points to base of transmit buffer
        !           190:                 ENDIF
        !           191: 
        !           192:  chst_bits      dw      ?       ; Port status bits
        !           193:  chmode_bits    dw      ?       ; Port mode bits
        !           194:  rts_lowater    dw      ?       ; When to assert RTS
        !           195:  rts_hiwater    dw      ?       ; When to deassert RTS
        !           196:  rx_accum       dw      ?       ; Counter for received characters
        !           197:  rx_lowater     dw      ?       ; Low water mark, point at which xon get's
        !           198:                                 ; transmitted.
        !           199:  rx_hiwater     dw      ?       ; High water mark, point at which xoff gets
        !           200:                                 ; transmitted.
        !           201:  stop_xmt       dw      ?       ; If xon/xoff enabled character that stops
        !           202:                                 ; transmitter.
        !           203:  start_xmt      dw      ?       ; If xon/xoff enabled character that starts
        !           204:                                 ; transmitter.
        !           205:  stop_rem_xmt   dw      ?       ; Character sent when rx buffer almost full
        !           206:  start_rem_xmt  dw      ?       ; Character sent when rx buffer almost empty
        !           207: 
        !           208:  break_delay    dw      ?       ; Amount of delay for break signal
        !           209:  aswmodem       dw      ?
        !           210:  aswtime        dw      ?       ;
        !           211:  asrtime        dw      ?
        !           212: 
        !           213:  chkchr_1       dw      ?       ; Check character #1
        !           214:  chkchr_2       dw      ?       ; Check character #2
        !           215:  chkchr_3       dw      ?       ; Check character #3
        !           216:  mscount        dw      ?
        !           217:  lscount        dw      ?
        !           218:  txcount        dw      ?
        !           219:  rxcount        dw      ?
        !           220:  out12_mask     dw      ?
        !           221:  ls_ms_ier      dw      ?
        !           222:  if             @DataSize NE 0
        !           223:    generic_driver dd      ?
        !           224:  else
        !           225:    generic_driver dw      ?
        !           226:  endif
        !           227: 
        !           228: ifndef VGFD
        !           229:  tx_16550_limit dw      ?       ; FIFO buffer limit for 16550
        !           230: endif
        !           231: 
        !           232:                 IFDEF   VGFD
        !           233:  reserved1      dw      2 dup(0); for VGFD
        !           234:  reserved2      dw      2 dup(0); for VGFD
        !           235:                 ENDIF
        !           236: 
        !           237: portst  ends
        !           238: 
        !           239: 
        !           240: PORTINFO        STRUC
        !           241:                         IFDEF   VGFD
        !           242:   ptb                   DW      2 DUP(?)        ;Vlad wants all large ptrs
        !           243:                         ELSE
        !           244:   ptb                   DW      ptrsize DUP(?)
        !           245:                         ENDIF
        !           246:   as_shport             DW      ?
        !           247:   as_shbits             DW      ?
        !           248:   as_mask               DW      ?
        !           249:   as_xorv               DW      ?
        !           250:   handler_type          DW      ?  ;0 = new greenleaf handler, via Hook...()
        !           251:                                    ;1 = old greenleaf handler, via asihsel()
        !           252:                                    ;2 = multiport hanlder, via Hook...()
        !           253:                 IFDEF   VGFD
        !           254: task_handle_port dw      1 dup(0); for VGFD
        !           255: vm_id_port       dw      1 dup(0); for VGFD
        !           256: reserved3        dw      2 dup(0); for VGFD
        !           257:                 ENDIF
        !           258: 
        !           259: PORTINFO        ENDS
        !           260: 
        !           261: 
        !           262: PORTINFO_SIZE   EQU     SIZE PORTINFO
        !           263: 
        !           264: ;==>--  Error return codes for assembler functions.
        !           265: ;
        !           266: ASSUCCESS       equ      0      ;/* No error */
        !           267: ASGENERALERROR  equ     -1      ;/* Catch-All */
        !           268: ASINVPORT       equ     -2      ;/* Requested port out of range */
        !           269: ASINUSE         equ     -3      ;/* port already setup */
        !           270: ASINVBUFSIZE    equ     -4      ;/* Invalid buffer size requested */
        !           271: ASNOMEMORY      equ     -5      ;/* No memory available for buffers */
        !           272: ASNOTSETUP      equ     -6      ;/* asifirst() not run on port */
        !           273: ASINVPAR        equ     -7      ;/* Invalid parameter */
        !           274: ASBUFREMPTY     equ     -8      ;/* Buffer is empty */
        !           275: ASBUFRFULL      equ     -9      ;/* Buffer is full */
        !           276: ASTIMEOUT       equ     -10     ;/* Function timed out */
        !           277: ASNOCTS         equ     -11     ;/* CTS was not active */
        !           278: ASNOCD          equ     -12     ;/* CD (Carrier detect) not active */
        !           279: ASNODSR         equ     -13     ;/* DSR (Data set ready) not active */
        !           280: ASNO8250        equ     -14     ;/* No 8250 installed at i/o address */
        !           281:         .list
        !           282: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.