-$Id$
+ $Id$
COMBOOT and COM32 files
This call gives information specific to a particular SYSLINUX
derivative. The value returned in AL is the same as is
returned in DL by INT 22h AX=0001h.
+
+
+AX=000Bh Get Serial Console Configuration
+
+ Input: AX 000Bh
+ Output: DX Serial port I/O base (e.g. 3F8h = COM1...)
+ CX Baud rate divisor (1 = 115200 bps, 2 = 57600 bps...)
+ BX Flow control configuration bits (see syslinux.doc)
+
+ If no serial port is configured, DX will be set to 0 and the
+ other registers are undefined.
ret
;
+; INT 22h AX=000Bh Get Serial Console Configuration
+;
+comapi_serialcfg:
+ mov ax,[SerialPort]
+ mov P_DX,ax
+ mov ax,[BaudDivisor]
+ mov P_CX,ax
+ mov ax,[FlowControl]
+ or al,ah
+ mov ah,[FlowIgnore]
+ shr ah,4
+ mov P_BX,ax
+ clc
+ ret
+
+;
; This stuff should really be in the data section...
;
%macro int21 2
dw comapi_close ; 0008 close file
dw comapi_pxecall ; 0009 call PXE stack
dw comapi_derinfo ; 000A derivative-specific info
+ dw comapi_serialcfg ; 000B get serial port config
int22_count equ ($-int22_table)/2
APIKeyWait db 0
ScreenSize equ $
VidCols resb 1 ; Columns on screen-1
VidRows resb 1 ; Rows on screen-1
+BaudDivisor resw 1 ; Baud rate divisor
FlowControl equ $
FlowOutput resb 1 ; Outputs to assert for serial flow
FlowInput resb 1 ; Input bits for serial flow
ScreenSize equ $
VidCols resb 1 ; Columns on screen-1
VidRows resb 1 ; Rows on screen-1
+BaudDivisor resw 1 ; Baud rate divisor
FlowControl equ $
FlowOutput resb 1 ; Outputs to assert for serial flow
FlowInput resb 1 ; Input bits for serial flow
mov eax,BAUD_DIVISOR
cdq
div ebx
+ mov [BaudDivisor],ax
push ax ; Baud rate divisor
cmp di,3
ja .port_is_io ; If port > 3 then port is I/O addr
ScreenSize equ $
VidCols resb 1 ; Columns on screen-1
VidRows resb 1 ; Rows on screen-1
+BaudDivisor resw 1 ; Baud rate divisor
FlowControl equ $
FlowOutput resb 1 ; Outputs to assert for serial flow
FlowInput resb 1 ; Input bits for serial flow