1 ; BEGIN INCLUDE FILE: mowsdefs.mac
  2 
  3 ; HISTORY COMMENTS:
  4 ;  1) change(85-12-15,Flegel), approve(87-07-13,mcr7580),
  5 ;     audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072):
  6 ;     Created.
  7 ;  2) change(86-09-11,Flegel), approve(87-07-13,mcr7580),
  8 ;     audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072):
  9 ;     Changed MASKMCR to force DTR high (initialized
 10 ;     to 1) at initialization so that DTR is not dropped thus preventing the
 11 ;     line from dropping.
 12 ;  3) change(88-01-26,Flegel), approve(88-02-29,mcr7853),
 13 ;     audit(88-03-10,Nakaska):
 14 ;     Copied in startup option definitions from MOWSE.C
 15 ;                                                      END HISTORY COMMENTS
 16 
 17 ; FUNCTION
 18 ;
 19 ; define all necessary assembler definitions for mowse
 20 
 21 ;--------------Buffer Sizes---------------
 22 
 23 BUFSIZE         = 4096          ;4k General buffer size
 24 TBUFSIZE        = 4096          ;4k Terminal buffer size
 25 PBUFSIZE        = 520           ;packet_buf size = a little over 512,just in case
 26 WSPAKSIZ        = 121           ; packet size
 27 
 28 ;--------------ASCII codes----------------
 29 
 30 LF              = 0Ah           ;line feed
 31 CR              = 0dh           ;carridge return
 32 ESC             = 1bh           ;escape
 33 SOP             = 01h           ;Start of packet
 34 EOP             = 0Ah           ;End of Packet
 35 TAB             = 09h           ;Tab character
 36 
 37 ;--------------BIOS calls------------------
 38 
 39 RS232           = 14h           ;RS232 Service
 40 kbd_io          = 16h           ;Keyboard service
 41 
 42 ;--------------DOS calls-------------------
 43 
 44 DOSFUNCTION     = 21h           ;DOS function
 45 PRINTSTRING     = 09h           ;print string
 46 SETVECTOR       = 25h           ;set interrupt vector
 47 GETVECTOR       = 35h           ;get interrupt vector
 48 
 49 ;--------------INS8250 ACE Registers-----------
 50 
 51 DLL             = 00000000b     ; divisor latch least significant
 52 DLM             = 00000001b     ; divisor latch most significant
 53 THR             = 00000000b     ; Transmitter holding register
 54 RBR             = 00000000b     ; Receiver buffer register(read)
 55 IER             = 00000001b     ; interrupt enable register
 56 IIR             = 00000010b     ; interrupt identification register
 57 LCR             = 00000011b     ; line control register
 58 MCR             = 00000100b     ; modem control register
 59 LSR             = 00000101b     ; line status register
 60 MSR             = 00000110b     ; modem status register
 61 
 62 LSR_LSTATUS     = 00000110b     ; line status interrupt (LSR)
 63 LSR_RCV         = 00000100b     ; receive data interrupt (LSR)
 64 LSR_THRE        = 00000010b     ; transmitter holding register empty (LSR)
 65 LSR_MSI         = 00000000b     ; modem status interrupt (LSR)
 66 IIR_PENDING     = 00000001b     ; interrupt pending (IIR)
 67 
 68 ;------------- Ports ----------------------------
 69 
 70 IMR8259         = 21h           ;Interrupt mask register port
 71 OMR8259         = 20h           ;Signal mask register port
 72 
 73 ;------------- Masks ----------------------------
 74 
 75 MCRREAD         = 00001011b     ;enable: read modem
 76 MASKLCR         = 01111111b     ;reset: DLAB
 77 MASKIER         = 00001111b     ;enable: ALL
 78 MASKMCR         = 00001011b     ;enable: out2, RTS, DTR
 79 MASKMCR_DROP    = 00001000b     ;enable: out2, RTS LOW, DTR LOW
 80 MSRCTS          = 00010000b     ;test: MSR clear to send
 81 LSRTHRE         = 00100000b     ;test: LSR transmit holding register empty
 82 MASKEOI         = 00100000b     ;enable: end of interrupt
 83 MASKPENDING     = 00000001b     ;test: interrupt pending
 84 MASKBREAK       = 00000110b     ;test: break detect
 85 MASKRDATA       = 00000100b     ;test: receive data ready
 86 MASKTDATA       = 00000010b     ;test: transmit register empty
 87 MASKMCHNG       = 00000000b     ;test: modem change in status
 88 MASK7           = 01111111b     ;enable: all but bit 7
 89 MASKERROR       = 00011110b     ;test: break,framing,parity,overrun
 90 
 91 ;------------- structure holding parameters for initialising com 1
 92 
 93 commparm record baud:3, parity:2, stopbits:1, wordbits:2
 94 
 95 ;--------------Baud rates------------------------------
 96 ; refer to tech manual on rs232
 97 
 98 B110            = 000b
 99 B150            = 001b
100 B300            = 010b
101 B600            = 011b
102 B1200           = 100b
103 B2400           = 101b
104 B4800           = 110b
105 B9600           = 111b
106 
107 ;-------------------Parity-----------
108 
109 no_parity       = 00b
110 odd_parity      = 01b
111 even_parity     = 11b
112 
113 ;--------------Stop bits-------------
114 
115 stop1           = 0
116 stop2           = 1
117 
118 ;--------------Data bits-------------
119 
120 data7           = 10b
121 data8           = 11b
122 
123 ;-------------- Constants
124 
125 FRAMESIZE       = 600h          ;offset above stack_base
126 ADD_CONTROL     = 32            ;control addition for capabilities
127 
128 ;-------------- Startup option definitions
129 
130 OPTION_B        = 1h            ; B parameter option
131 OPTION_C        = 2h            ; C
132 OPTION_D        = 4h            ; D
133 OPTION_I        = 8h            ; I
134 OPTION_P        = 10h           ; P
135 OPTION_S        = 20h           ; S
136 OPTION_GX       = 40h           ; G X
137 OPTION_GR       = 80h           ; G R
138 OPTION_GP       = 100h          ; G P
139 OPTION_H        = 200h          ; H
140 
141 ; END INCLUDE FILE: mowsdefs.mac