Download Brainboxes IE-296 Technical information

Transcript
Serial Solutions
clsp01:
ret
close_com endp
Aterm
;Done
DOS function 03EH does not access the device driver, but
merely informs DOS that the program no longer wishes to use
the file.
Serial Port Parameters.
____________________
_
The serial port settings, the Baud rate, parity etc., must be
set to the values that the remote device requires. In ATERM this
is all done by one subroutine, bios_x_init.
Figure 8-6. Subroutine Bios_x_init.
______________________________
;********************************************************************
;*
*
;* bios_x_init-check the global parameters for baud rate etc.
*
;*
if they are ok then use to set the current serial port *
;*
return carry set if fails.
*
;*
*
;********************************************************************
; On entry
; Segment registers as start proc
; Globals comno,baud,parity,stopbits,startbits set with values
;
; On exit
;
; Carry = true ==> values bad, could not set port
;
AH,BX,CX,DX undefined
; Carry = false ==> values good, used to set port.
;
AX,BX,CX,DX as BIOS service 04H
; Other flags undefined
; All other regs maintained.
; Stack useage-as BIOS service (currently 22 bytes)
;
; Note- this service assumes the presence of Brain Boxes Asynchronous
; BIOS. This is included in the Brain Boxes serial device driver.
;
bios_x_init proc near
mov al,brk
cmp al,1
ja bxi01
;Bad break parameter
mov bh,parity
cmp bh,4
ja bxi01
;Bad parity
mov bl,stopbits
Page 136
Chapter 8
ý