source: vendor/emx/current/src/dos/termio.inc

Last change on this file was 18, checked in by bird, 22 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 6.0 KB
Line 
1;
2; TERMIO.INC -- General terminal interface
3;
4; Copyright (c) 1991-1995 by Eberhard Mattes
5;
6; This file is part of emx.
7;
8; emx is free software; you can redistribute it and/or modify it
9; under the terms of the GNU General Public License as published by
10; the Free Software Foundation; either version 2, or (at your option)
11; any later version.
12;
13; emx is distributed in the hope that it will be useful,
14; but WITHOUT ANY WARRANTY; without even the implied warranty of
15; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16; GNU General Public License for more details.
17;
18; You should have received a copy of the GNU General Public License
19; along with emx; see the file COPYING. If not, write to
20; the Free Software Foundation, 59 Temple Place - Suite 330,
21; Boston, MA 02111-1307, USA.
22;
23; See emx.asm for a special exception.
24;
25
26;
27; cf. /emx/include/sys/termio.h and /emx/include/sys/ioctl.h
28;
29
30TCGETA = 1
31TCSETA = 2
32TCSETAW = 3
33TCSETAF = 4
34TCFLSH = 5
35TCSBRK = 6
36TCXONC = 7
37_TCGA = 8 ; Used internally for tcgetattr()
38_TCSANOW = 9 ; Used internally for tcsetattr()
39_TCSADRAIN = 10 ; Used internally for tcsetattr()
40_TCSAFLUSH = 11 ; Used internally for tcsetattr()
41FIONREAD = 16
42FGETHTYPE = 32
43
44VINTR = 0
45VQUIT = 1
46VERASE = 2
47VKILL = 3
48VEOF = 4
49VEOL = 5
50VMIN = 6
51VTIME = 7
52VSUSP = 8 ; termios
53VSTOP = 9 ; termios
54VSTART = 10 ; termios
55
56NCC = 8 ; termio
57NCCS = 11 ; termios
58
59IGNBRK = 0001H
60BRKINT = 0002H
61IGNPAR = 0004H
62PARMRK = 0008H
63INPCK = 0010H
64ISTRIP = 0020H
65INLCR = 0040H
66IGNCR = 0080H
67ICRNL = 0100H
68IUCLC = 0200H
69IXON = 0400H
70IXANY = 0800H
71IXOFF = 1000H
72IDELETE = 8000H
73
74OPOST = 0001H
75OLCUC = 0002H
76ONLCR = 0004H
77OCRNL = 0008H
78ONOCR = 0010H
79ONLRET = 0020H
80OFILL = 0040H
81OFDEL = 0080H
82NLDLY = 0100H ; Mask
83NL0 = 0000H
84NL1 = 0100H
85CRDLY = 0600H ; Mask
86_CR0 = 0000H
87_CR1 = 0200H
88_CR2 = 0400H
89_CR3 = 0600H
90TABDLY = 1800H ; Mask
91TAB0 = 0000H
92TAB1 = 0800H
93TAB2 = 1000H
94TAB3 = 1800H
95BSDLY = 2000H ; Mask
96BS0 = 0000H
97BS1 = 2000H
98VTDLY = 4000H ; Mask
99VT0 = 0000H
100VT1 = 4000H
101FFDLY = 8000H ; Mask
102FF0 = 0000H
103FF1 = 8000H
104
105CBAUD = 000FH ; Mask
106B0 = 0000H
107B50 = 0001H
108B75 = 0002H
109B110 = 0003H
110B134 = 0004H
111B150 = 0005H
112B200 = 0006H
113B300 = 0007H
114B600 = 0008H
115B1200 = 0009H
116B1800 = 000AH
117B2400 = 000BH
118B4800 = 000CH
119B9600 = 000DH
120B19200 = 000EH
121B38400 = 000FH
122CSIZE = 0030H ; Mask
123CS5 = 0000H
124CS6 = 0010H
125CS7 = 0020H
126CS8 = 0030H
127CSTOPB = 0040H
128CREAD = 0080H
129PARENB = 0100H
130PARODD = 0200H
131HUPCL = 0400H
132CLOCAL = 0800H
133LOBLK = 1000H
134
135ISIG = 0001H
136ICANON = 0002H
137XCASE = 0004H
138IECHO = 0008H
139ECHOE = 0010H
140ECHOK = 0020H
141ECHONL = 0040H
142NOFLSH = 0080H
143IDEFAULT = 8000H
144
145
146;
147; ioctl()
148;
149TERMIO STRUCT
150C_IFLAG DD ?
151C_OFLAG DD ?
152C_CFLAG DD ?
153C_LFLAG DD ?
154C_LINE DD ?
155C_CC DB NCC DUP (?)
156TERMIO ENDS
157
158TERMIOS STRUCT
159C_IFLAG DD ?
160C_OFLAG DD ?
161C_CFLAG DD ?
162C_LFLAG DD ?
163C_CC DB NCCS DUP (?)
164 ALIGN 4
165C_RESERVED DD 4 DUP (?)
166TERMIOS ENDS
167
168MY_TERMIO STRUCT
169C_IFLAG DD ?
170C_OFLAG DD ?
171C_CFLAG DD ?
172C_LFLAG DD ?
173C_CC DB NCCS DUP (?)
174MY_TERMIO ENDS
175
176;
177; cf. /emx/include/sys/fcntl.h
178;
179F_GETFL = 1
180F_SETFL = 2
181F_GETFD = 3
182F_SETFD = 4
183
184O_NDELAY = 04H
185O_APPEND = 08H
186
187 IFNDEF __TERMIO
188
189SV_DATA SEGMENT
190
191 EXTRN STDIN_TERMIO:MY_TERMIO
192 EXTRN STDIN_FL:DWORD
193
194SV_DATA ENDS
195
196
197SV_CODE SEGMENT
198
199 EXTRN TERMIO_INIT:NEAR
200 EXTRN TERMIO_READ:NEAR
201 EXTRN STDIN_AVAIL:NEAR
202 EXTRN KBD_FLUSH:NEAR
203 EXTRN TERMIO_GET:NEAR
204 EXTRN TERMIO_SET:NEAR
205 EXTRN TERMIO_FLUSH:NEAR
206 EXTRN TERMIOS_GET:NEAR
207 EXTRN TERMIOS_SET:NEAR
208 EXTRN TERMIOS_FLUSH:NEAR
209
210SV_CODE ENDS
211
212INIT_CODE SEGMENT
213
214 EXTRN POLL_KEYBOARD:NEAR
215 EXTRN INIT_TERMIO:NEAR
216
217INIT_CODE ENDS
218
219 ENDIF
Note: See TracBrowser for help on using the repository browser.