Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/GLABIOS.ASM
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,8 @@ TURBO_TYPE = TURBO_NONE ; disable Turbo features
SW1_VID = 10b ; SW1 5/6 ON/OFF Video Type CGA 80
SW1_FLP = 1 ; SW1 7/8 Max # of floppy drives (0-3)
; 0-based: 0=1 drive, 1=2 drives, etc
POST_TEST_SEEK = 0 ; disabe floppy drive seek test
CGA_SNOW_REMOVE = 0 ; disable CGA snow removal
ENDIF

IF ARCH_TYPE EQ ARCH_EMU
Expand Down Expand Up @@ -6235,8 +6237,6 @@ INT_14_1 PROC
ADD DX, COM1_MCR-COM1_DATA ; DX = 3FC/2FC - Modem Control Register
MOV AL, MASK RTS OR MASK DTR ; activate DTR & RTS
OUT DX, AL ; set DTR or RTS
INC DX
INC DX ; DX = 3FE - Modem Status Register
MOV BX, DBW <MASK THRE OR MASK LBI, MASK MDSR> ; BH = line (THRE)
; BL = modem (DSR/CTS)
CALL INT_14_POLL ; poll both registers, AH = status
Expand Down Expand Up @@ -6269,11 +6269,10 @@ INT_14_2 PROC
ADD DX, COM1_MCR-COM1_DATA ; DX = 3FC/2FC - Modem Control Register
MOV AL, MASK DTR ; activate DTR
OUT DX, AL ; set DTR
INC DX
INC DX ; DX = 3FE/2FE - Modem Status Register
MOV BX, DBW <MASK MDSR, MASK LDR> ; BH = modem (DSR), BL = line (data ready)
CALL INT_14_POLL ; poll both registers, AH = status
POP DX ; restore base port
JNZ INT_14_RW_ERR ; Jump if port timeout
AND AH, MASK LBI OR MASK LFE OR MASK LPE OR MASK LOE ; include only
; error bits in port status
IN AL, DX ; read char from buffer
Expand All @@ -6285,7 +6284,7 @@ INT_14_2 ENDP
;----------------------------------------------------------------------------;
; Input:
; DI = port index (0 based byte)
; DX = 3FE Modem Status Register
; DX = 3FC Modem Status Register
; BL = line status expected masked
; BH = modem status expected masked
; Output:
Expand All @@ -6296,6 +6295,8 @@ INT_14_2 ENDP
; Clobbers: AX, CX
;----------------------------------------------------------------------------;
INT_14_POLL PROC
INC DX
INC DX ; DX = 3FE/2FE - Modem Status Register
CALL INT_14_POLL_PORT ; first poll modem status
JNZ INT_14_POLL_RET ; jump if ZF = 0, timeout or failure occurred
XCHG BH, BL ; BH = line status
Expand All @@ -6318,7 +6319,7 @@ INT_14_POLL_LOOP:
JZ INT_14_POLL_DONE
LOOP INT_14_POLL_LOOP ; poll port 65,535 * timeout times
DEC SI ;
JNZ INT_14_POLL_LOOP ; Jump if timeout not expired
JNS INT_14_POLL_LOOP ; Jump if timeout not expired
INT_14_POLL_DONE:
POP SI
INT_14_POLL_RET:
Expand Down