mirror of
https://github.com/FDOS/kernel.git
synced 2025-09-21 17:07:58 +02:00
Serial code fixes from the FD1.0 kernel.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1302 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
ba7bde0bdf
commit
4768a9d2f8
@ -40,7 +40,7 @@ ComTable db 0Ah
|
|||||||
dw _IOCommandError
|
dw _IOCommandError
|
||||||
dw ComRead
|
dw ComRead
|
||||||
dw ComNdRead
|
dw ComNdRead
|
||||||
dw _IOExit
|
dw ComInStat
|
||||||
dw ComInpFlush
|
dw ComInpFlush
|
||||||
dw ComWrite
|
dw ComWrite
|
||||||
dw ComWrite
|
dw ComWrite
|
||||||
@ -84,6 +84,18 @@ BiosRdRetn:
|
|||||||
retn
|
retn
|
||||||
|
|
||||||
|
|
||||||
|
ComInStat: ; similar to ComNdRead but returns no char, only flags
|
||||||
|
call GetComStat
|
||||||
|
mov al,[bx]
|
||||||
|
or al,al
|
||||||
|
jnz ComInAvail
|
||||||
|
call ComRdStatus
|
||||||
|
test ah,1 ; char waiting
|
||||||
|
jz ComNdRtn
|
||||||
|
; test al,20h ; DSR (why do we test this?)
|
||||||
|
; jz ComNdRtn
|
||||||
|
ComInAvail: jmp _IOExit ; return "ready"
|
||||||
|
|
||||||
|
|
||||||
ComNdRead:
|
ComNdRead:
|
||||||
call GetComStat
|
call GetComStat
|
||||||
@ -91,17 +103,17 @@ ComNdRead:
|
|||||||
or al,al
|
or al,al
|
||||||
jnz ComNdRd1
|
jnz ComNdRd1
|
||||||
call ComRdStatus
|
call ComRdStatus
|
||||||
test ah,1
|
test ah,1 ; char waiting
|
||||||
jz ComNdRtn
|
|
||||||
test al,20h
|
|
||||||
jz ComNdRtn
|
jz ComNdRtn
|
||||||
|
; test al,20h ; DSR (why do we test this?)
|
||||||
|
; jz ComNdRtn
|
||||||
call BiosRdCom
|
call BiosRdCom
|
||||||
call GetComStat
|
call GetComStat
|
||||||
mov [bx],al
|
mov [bx],al
|
||||||
ComNdRd1:
|
ComNdRd1:
|
||||||
jmp CommonNdRdExit
|
jmp CommonNdRdExit ; return that char
|
||||||
ComNdRtn:
|
ComNdRtn:
|
||||||
jmp _IODone
|
jmp _IODone ; return "busy"
|
||||||
|
|
||||||
|
|
||||||
ComOutStat:
|
ComOutStat:
|
||||||
@ -110,7 +122,7 @@ ComOutStat:
|
|||||||
jz ComNdRtn
|
jz ComNdRtn
|
||||||
test ah,20h
|
test ah,20h
|
||||||
jz ComNdRtn
|
jz ComNdRtn
|
||||||
jmp _IOExit
|
jmp _IOExit ; return "ready"
|
||||||
|
|
||||||
|
|
||||||
ComRdStatus:
|
ComRdStatus:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user