Technical information
Serial Solutions Aterm
Function 40H, write handle, to send characters to the port and
Function 3EH, close handle, to close the file.
BIOS services provided by NewBIOS are accessed through
INT 14H, in the subroutine bios_x_init, to set parameters such as
the Baud rate and parity associated with a port.
DOS function 44H codes 0 and 1 are used to get and set
respectively the device data maintained by DOS. This allows the
subroutine uncook to change the file associated with the serial
port from cooked to raw data mode. The latter allows more than
one character at a time to be transmitted, and prevents DOS
interfering with control characters.
Opening The File.________________
In ATERM the subroutine ’open_com’ opens the port.
Figure 8-1. Subroutine Open-com.______________________________
;********************************************************************
;* *
;* open_com- attempts to open file comname. Stores file handle *
;* in comport. If fails prints a message to that effect. *
;* *
;********************************************************************
;
; On entry
; Segment registers as start proc
; Other regs undefined
;
; On exit
; AX undefined
; BX undefined
; DX undefined
;
; Flags undefined
; All other regs unaffected.
; Stack useage-as DOS functions 3DH, procs uncook, screen
;
open_com proc near
mov ah,3DH ;DOS open handle
mov al,2 ;Access code ==> no inherit, compatibility
;sharing and read/write access.
mov dx, offset comnam ;Name of device
int dos
Page 130 Chapter 8