Technical information

Using NewBIOS Serial Solutions
3420 :
3440 ADDR = VARPTR(ASM%(0))
3450 CALL ADDR(AX,BX,CX,DX) ’Second call
3460 :
3470 END
Microsoft FORTRAN77.______________________
FORTRAN 77, was the very first high-level language and,
much enhanced, is still a mainstay of much computing.
Microsoft FORTRAN77 for IBM PCs unfortunately provides no
services to access the machine BIOS. However it is not to
difficult to interface any FORTRAN program to subroutines
written in languages which do support the BIOS.
Serial Solutions includes one such subroutine, called
INTRPT (files ’intrpt.asm’ and ’intrpt.obj’ ), written in assembly
language. It was written to be used with large model programs,
though it can be used with medium model code as well. It was
assembled with CodeView information. The required interface
statement looks like:
interface to subroutine intrpt ( intno, regs)
C Define data structure that Intrpt uses.
structure /regtype/
union
map
integer*1 al,ah,bl,bh,cl,ch,dl,dh
end map
map
integer*2 ax,bx,cx,dx,si,di,cflag
end map
end union
end structure
integer intno [far,reference]
record /regtype/ regs [far,reference]
end
Note how the record used reflects the actual organisation of the
8086, with its byte and word registers.
’Intno’ is the interrupt number to be initiated- any integer
type (integer*1, integer*2 or integer*4) can be used. Intrpt places
the values in ’regs’ in the registers of the 8086 and performs
Chapter 4 Page 63