Implement int 28h: Idle callout

This commit is contained in:
Nero 2020-04-20 19:19:14 +02:00
parent 40065266f3
commit f8788720f5

View File

@ -204,6 +204,15 @@ ldbpb: push ds
pop ds pop ds
ret ret
; DOS 2+ - DOS IDLE INTERRUPT
; Usually hooked by TSRs
idle: sti
; sti takes one instruction to take effect
nop
; Wait until next interrupt
hlt
iret
; DOS 2+ - FAST CONSOLE OUTPUT ; DOS 2+ - FAST CONSOLE OUTPUT
; IN al character to print ; IN al character to print
fputc: push ax fputc: push ax
@ -215,7 +224,7 @@ fputc: push ax
pop ax pop ax
iret iret
main: hlt main: int 0x28
jmp main jmp main
init: cli init: cli
@ -253,5 +262,5 @@ init: cli
ivects: dw int20h, int21h, iret, iret ivects: dw int20h, int21h, iret, iret
dw iret, iret, iret, iret dw iret, iret, iret, iret
dw iret, fputc, iret, iret dw idle, fputc, iret, iret
dw iret, iret, iret, iret dw iret, iret, iret, iret