Technical information

Using NewBIOS Serial Solutions
DX := $1; {COM2}
Intr($14, Ioregs); {Asynchronous services}
IF
( AH AND $80 ) <> 0 {Check that send ok}
THEN
Writeln(’COM2 timed out on output.’);
END;
END.
Example 3, Setting Port Addresses.______________________________
I/O addresses for COM3 and COM4 are set using service
ADH. This is a service available only to NewBIOS. The
program also checks for the presence of NewBIOS.
USES
DOS; {Contains Registers type and Intr Procedure}
VAR
Ioregs: Registers;
Com3Addr,
Com4Addr: Word;
BEGIN
{Pascal code fragment to set}
(COM3 and COM4 addresses.}
WITH Ioregs DO BEGIN
Com3Addr := $3220;
Com4Addr := $3228;
AH := $AD; {Service ADH, set address}
DX := $2; {COM3}
BX := Com3Addr; {Address of COM3}
Intr($14, Ioregs); {Asynchronous services}
IF
AX <> $52AD {Check NewBIOS present}
THEN BEGIN
Writeln(’NewBIOS not installed!’);
Halt(1);
END;
AH := $AD; {Service ADH}
DX := $3; {COM4}
BX := Com4Addr; {Address of COM4}
Intr($14, Ioregs);
END;
Chapter 4 Page 55