Muta,
Post by ***@gmail.comSo is there a DOS interrupt to do the equivalent
of the mode command?
No, as the "mode" program has bundled up a slew of different settings.
*One* of them being the serial port
Question : Do you already have a copy of Ralf Brown's Inerrup List ? If
not, I strongly advice you to get yourself one.
In it you can find, among /lots/ more, this :
Notice that the second set allows higher baudrates by sacrificing some of
the lower ones. Which of the four below sets works for you is dependant on
your hardware and BIOS.
--------S-1400-------------------------------
INT 14 - SERIAL - INITIALIZE PORT
AH = 00h
AL = port parameters (see #00300)
DX = port number (00h-03h) (04h-43h for Digiboard XAPCM232.SYS)
Return: AH = line status (see #00304)
FFh if error on Digiboard XAPCM232.SYS
AL = modem status (see #00305)
Notes: default handler is at F000h:E739h in IBM PC and 100% compatible
BIOSes
since the PCjr supports a maximum of 4800 bps, attempting to set 9600
bps will result in 4800 bps
various network and serial-port drivers support the standard BIOS
functions with interrupt-driven I/O instead of the BIOS's polled I/O
the 1993/04/08 Compaq system ROM uses only the low two bits of DX
the default setting used by DOS (MS-DOS 6, DR-DOS 7.03, PTS-DOS) when
(re-)initializing the serial devices is AL=A3h (2400 bps, no parity,
1 stop bit, 8 data bits).
SeeAlso: AH=04h"SERIAL",AH=04h"MultiDOS",AH=05h"SERIAL",AH=57h
SeeAlso: AX=8000h"ARTICOM",AH=81h"COMM-DRV",AH=82h"COURIERS",AH=8Ch
SeeAlso: MEM 0040h:0000h,PORT 03F8h"Serial"
Bitfields for serial port parameters:
Bit(s) Description (Table 00300)
7-5 data rate (110,150,300,600,1200,2400,4800,9600 bps)
4-3 parity (00 or 10 = none, 01 = odd, 11 = even)
2 stop bits (set = 2, clear = 1)
1-0 data bits (00 = 5, 01 = 6, 10 = 7, 11 = 8)
SeeAlso: #00302,#00307,#00308,#00309
--------S-1400-------------------------------
INT 14 - FOSSIL (Fido/Opus/Seadog Standard Interface Level) - INITIALIZE
AH = 00h
AL = initializing parameters
7 - 6 - 5 4 - 3 2 1 - 0
-BAUD RATE- PARITY STOP WORD
BITS LENGTH
000 19200 bd 00 none 0: 1 00: 5
001 38400 bd 01 odd 1: 2 01: 6
010 300 bd 11 even 10: 7
011 600 bd 11: 8
100 1200 bd
101 2400 bd
110 4800 bd
111 9600 bd (4800 on PCjr)
DX = port number (0-3 or FFh if only performing non-I/O setup)
Return: AH = RS-232 status code bits (see #00301)
AL = modem status bits
bit 3: always 1
bit 7: DCD - carrier detect
SeeAlso: #00300,AH=05h"FOSSIL",AH=81h"COMM-DRV",AH=82h"COURIERS"
Bitfields for FOSSIL RS-232 status:
Bit(s) Description (Table 00301)
0 RDA - input data is available in buffer
1 OVRN - data has been lost
5 THRE - room is available in output buffer
6 TSRE - output buffer empty
--------S-1400-------------------------------
INT 14 - Tandy 2000 - SERIAL - RESET COMM PORT
AH = 00h
AL = RS-232C parameters (see #00302)
DL = port number
DH = protocol
bit 0: use XON/XOFF on received data
bit 1: use XON/XOFF when transmitting
Return: AH = line status (see #00304)
AL = modem status (see #00305)
Note: this interrupt is identical to INT 53 on the Tandy 2000
SeeAlso: AH=04h"Tandy 2000",INT 53"Tandy 2000"
--------S-1400-------------------------------
INT 14 - MBBIOS - INITIALIZE PORT
AH = 00h
AL = port parameters (see #00302)
DX = port number
Return: AH = line status (see #00304)
AL = modem status (see #00305)
Note: MBBIOS was written by H. Roy Engehausen
SeeAlso: AH=04h"MBBIOS",AH=05h"MBBIOS",AH=09h"MBBIOS"
Bitfields for MBBIOS port parameters:
Bit(s) Description (Table 00302)
7-5 data rate
(normally 110,150,300,600,1200,2400,4800,9600 bps;
9600,14400,19200,28800,38400,57600,115200,330400 bps
if the high-speed option is set)
4-3 parity (00 or 10 = none, 01 = odd, 11 = even)
2 stop bits (set = 2, clear = 1)
1-0 data bits (00 = 5, 01 = 6, 10 = 7, 11 = 8)
SeeAlso: #00300
---------------------------------------------
Regards,
Rudy Wieser