Technical information

Serial Solutions Using NewBIOS
processor executes an ’INT n’ instruction. The number ’n’, in
the range 0 to 255, defines which interrupt routine to use. The
addresses of the 256 interrupt routines are stored in a table in
the PC’s memory which the processor reads to find the correct
program to run on an interrupt. So the instruction ’INT n’ causes
the processor to read the nth address and then run the routine
stored there. Each address takes four bytes, so the address of
interrupt 14H, which the asynchronous services interrupt, is at
50H (14H multiplied by 4). When the machine is started this is
set to the address of the ROM BIOS’ asynchronous services.
When NewBIOS is installed it’s code is placed in the PC’s
memory and the address is set to point to it.
The assembly language code to call the asynchronous
services is therefore:
INT 14H
Note that this will call the ROM BIOS routines unless
NewBIOS has been installed. The program cannot choose which
to call, nor can it tell which has been called except by
examining the results of the call.
The asynchronous services are controlled by the values
which are present in the 8086’s registers when the interrupt
occurs, and report back to the program by setting values in those
registers.
Aside On The 80x86 Registers Set.
A register is part of the processor which can store a
number, and assembly language instructions refer to these
registers for arithmetic, storage etc. The four general purpose
registers used to communicate with the asynchronous services
are AX, BX, CX and DX. Each of AX...DX is 16 bits wide
(that is large enough to store numbers in the range 0 to 65535),
but can alternatively be viewed as pairs of 8-bit-wide registers
(each valid for numbers from 0 to 255). The 8-bit registers are
called AH and AL (short for AX high and AX low) from AX,
BH and BL from BX, CH and CL and DH and DL. Within each
register the bits are number from 0 to 7 for an 8-bit register, and
from 0 to 15 for a 16-bit register.
Page 46 Chapter 4