Technical information

Serial Solutions Forterm
Figure 11-5. Function BIOS_X_init._______________________________
C Interface to assembly language routine which calls interrupts
interface to subroutine intrpt[FAR,ALIAS:"intrpt"]
+ ( intno, regs)
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
C *******************************************************************
C * *
C * BIOS_x_init, checks its parameters, and if they fall within *
C * the correct ranges uses them to set the serial port via *
C * the BIOS services. Returns .TRUE. if works, else .FALSE. *
C * *
C *******************************************************************
logical function BIOS_x_init(port, brk, par, stop, data, Baud)
integer*1 port, brk, par, stop, data, Baud
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
record /regtype/ registers
C Return false if any parameters bad
BIOS_x_init = .FALSE.
registers.ah = 4
if( (port .LT. 0) .OR. (port .GT. 15) ) return
registers.dx = port
Page 168 Chapter 11