Technical information

Serial Solutions Using NewBIOS
INT Intno. On return the values in the 8086 registers are copied
back into ’regs’. This means that the assembly language
examples above are very easy to translate into FORTRAN77.
The reader may wish to read the section earlier in this
chapter called ’accessing asynchronous services’, which discusses
the machine interrupts.
The user program must be linked with the file ’intrpt.obj’ ,
as
link myprog intrpt;
or
fl myprog.for intrpt
In medium model programs the ’far’ attributes tell
FORTRAN that intrpt is a large model routine and so compiles
large (ie segmented) addresses.
Example 1, Initialising A Port.__________________________
This example uses service 0H to set the Baud rate etc. for
COM1. A later chapter, "NewBIOS Reference", contains details
of this and all asynchronous services.
record /regtype/ registers
C Example 1, set COM1 to 1200 Baud, 7 Data bits, even parity
C and 1 stop bit.
C service 0, initialise
registers.ah = 16#0
C parameters as above
registers.al = 16#9A
C COM1
registers.dx = 0
call intrpt (16#14, registers)
Page 64 Chapter 4