-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINT14.PAS
49 lines (39 loc) · 978 Bytes
/
INT14.PAS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
INT 14 - BIOS Asynchronous Communications Services
Built with info from https://stanislavs.org/helppc/int_14.html
2022 LRT
}
unit
int14;
interface
type
ECOMPort = ( COM1, COM2, COM3, COM4 );
ECOMParity = ( EParityNone, EParityOdd, EParityEven );
ECOMData = ( EData5, EData6, EData7, EData8 );
ECOMStop = ( EStop1, EStop2 );
ECOMBaud = (
EBaud110,
EBaud150,
EBaud300,
EBaud600,
EBaud1200,
EBaud2400,
EBaud4800,
EBaud9600,
EBaud19200
);
procedure initCOM(port: ECOMPort; baud: ECOMBaud; data: ECOMData; stop: ECOMStop; parity: ECOMParity );
implementation
procedure initCOM(port: ECOMPort; baud: ECOMBaud; data: ECOMData; stop: ECOMStop; parity: ECOMParity); assembler;
asm
mov ah, 4
mov al, 0
mov bh, parity
mov bl, stop
mov ch, data
mov cl, baud
mov dh, 0
mov dl, port
int 14h
end;
end.