]>
Commit | Line | Data |
---|---|---|
6dd88c25 L |
1 | \r |
2 | b2m macro name,nr\r | |
3 | name equ nr\r | |
4 | M_&name equ 1 shl nr\r | |
5 | endm\r | |
6 | \r | |
7 | \r | |
8 | TCINIT equ 00h ;CP/M 3 DEVINI function\r | |
9 | TCGETA equ 01h ;Get the current serial port settings.\r | |
10 | TCSETA equ 02h ;Set the current serial port settings.\r | |
11 | TCSETAW equ 03h ;Allow the output buffer to drain\r | |
12 | TCSETAF equ 04h ;Allow the output buffer to drain, discard pending input\r | |
13 | TCSBRK equ 05h ;Sending a break (250ms .. 500ms)\r | |
14 | TCSBRKP equ 06h ;arg is timeinterval in 0.1sec\r | |
15 | TIOCSBRK equ 07h ;Turn break on\r | |
16 | TIOCCBRK equ 08h ;Turn break off\r | |
17 | TCXONC equ 09h ;Software flow control (TCOOFF, TCOON, TCIOFF, TCION)\r | |
18 | TCFLSH equ 0Ah ;Flush input/output buffer (TCIFLUSH, TCOFLUSH, TCIOFLUSH)\r | |
19 | FIONREAD equ 0Bh ;Get the number of bytes in the input buffer.\r | |
20 | TIOCOUTQ equ 0Ch ;Get the number of bytes in the output buffer.\r | |
21 | TIOCMGET equ 0Dh ;get the status of modem bits.\r | |
22 | TIOCMBIS equ 0Eh ;set the indicated modem bits.\r | |
23 | TIOCMBIC equ 0Fh ;clear the indicated modem bits.\r | |
24 | TIOCMSET equ 10h ;set the status of modem bits.\r | |
25 | TIOCGSOFTCAR equ 11h ;Get the status of the CLOCAL flag in the c_cflag field\r | |
26 | TIOCSSOFTCAR equ 12h ;Set the CLOCAL flag when *argp is nonzero, and clear it otherwise.\r | |
27 | \r | |
28 | \r | |
1c7e3963 | 29 | ; iflags bits (0)\r |
6dd88c25 L |
30 | b2m IGNBRK, 0 ;Ignore BREAK condition on input.\r |
31 | b2m BRKINT, 1\r | |
32 | b2m INPCK, 2 ;Enable input parity checking.\r | |
33 | b2m IGNPAR, 3 ;Ignore framing errors and parity errors.\r | |
34 | b2m PARMRK, 4 ;Prefix a character with a parity error or framing error with FFH 00H.\r | |
35 | b2m ISTRIP, 5 ;Strip off eighth bit.\r | |
36 | b2m PARODD, 6 ;If set, then parity for input and output is odd.\r | |
1c7e3963 | 37 | ; fflags bits (1)\r |
6dd88c25 L |
38 | b2m IXON, 0 ;Enable XON/XOFF flow control on output.\r |
39 | b2m IXANY, 1 ;Typing any character will restart stopped output.\r | |
40 | b2m IXOFF, 2 ;Enable XON/XOFF flow control on input.\r | |
41 | b2m CRTS_IFLOW, 3 ;RTS flow control of input.\r | |
42 | b2m CCTS_OFLOW, 4 ;CTS flow control of output.\r | |
43 | b2m CLOCAL, 5 ;Ignore modem control lines.\r | |
44 | b2m CREAD, 6 ;Enable receiver.\r | |
45 | \r | |
46 | \r | |
1c7e3963 | 47 | ; cflags (2)\r |
6dd88c25 L |
48 | M_CBAUD equ 01Fh ;Baud speed mask\r |
49 | B0 equ 000h ;hang up\r | |
50 | B50 equ 011h\r | |
51 | B75 equ 012h\r | |
52 | B110 equ 013h\r | |
53 | B134 equ 014h\r | |
54 | B150 equ 005h\r | |
55 | B300 equ 006h\r | |
56 | B600 equ 007h\r | |
57 | B1200 equ 008h\r | |
58 | B1800 equ 009h\r | |
59 | B2400 equ 00Ah\r | |
60 | B3600 equ 00Bh\r | |
61 | B4800 equ 00Ch\r | |
62 | B7200 equ 00Dh\r | |
63 | B9600 equ 00Eh\r | |
64 | B19200 equ 00Fh\r | |
65 | B28800 equ 001h\r | |
66 | B38400 equ 002h\r | |
67 | B57600 equ 003h\r | |
68 | B115200 equ 004h\r | |
69 | B144000 equ 014h\r | |
70 | B192000 equ 016h\r | |
71 | B288000 equ 017h\r | |
72 | M_CSIZE equ 020h ;Character size mask.\r | |
1c7e3963 L |
73 | M_CS7 equ 000h ;\r |
74 | M_CS8 equ 020h ;\r | |
75 | CS8 equ 5 ;\r | |
6dd88c25 L |
76 | b2m CSTOPB, 6 ;Set two stop bits, rather than one.\r |
77 | b2m PARENB, 7 ;Enable parity generation on output and parity checking for input.\r | |
78 | \r | |
79 | \r | |
80 | ; tcflag_t c_lflag; /* local mode flags */\r | |
81 | ;ECHO equ 00000001B\r | |
82 | \r | |
83 | \r | |
84 | ; Parameter for TCXONC\r | |
85 | TCOOFF equ 0 ;suspends output.\r | |
86 | TCOON equ 1 ;restarts suspended output.\r | |
87 | TCIOFF equ 2 ;transmits a STOP character\r | |
88 | TCION equ 3 ;transmits a START character\r | |
89 | \r | |
90 | ; Parameter for TCFLSH\r | |
91 | TCIFLUSH equ 0 ;flushes data received but not read.\r | |
92 | TCOFLUSH equ 1 ;flushes data written but not transmitted.\r | |
93 | TCIOFLUSH equ 2 ;flushes both.\r | |
94 | \r | |
95 | ; modem lines\r | |
96 | \r | |
97 | TIOCM_LE equ 001h ;DSR (data set ready/line enable)\r | |
98 | TIOCM_DTR equ 002h ;DTR (data terminal ready)\r | |
99 | TIOCM_RTS equ 004h ;RTS (request to send)\r | |
100 | TIOCM_CTS equ 008h ;CTS (clear to send)\r | |
101 | TIOCM_CD equ 010h ;DCD (data carrier detect)\r | |
102 | TIOCM_RI equ 020h ;RNG (ring)\r | |
103 | TIOCM_DSR equ 040h ;DSR (data set ready)\r | |
104 | TIOCM_OUT1 equ 080h ;\r |