From f8788720f5b458d57f9b58d8c9e053d4ec190b68 Mon Sep 17 00:00:00 2001 From: Ain <41307858+nero@users.noreply.github.com> Date: Mon, 20 Apr 2020 19:19:14 +0200 Subject: [PATCH] Implement int 28h: Idle callout --- boot/kernel.asm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/boot/kernel.asm b/boot/kernel.asm index 7c94c61..a31d9a3 100644 --- a/boot/kernel.asm +++ b/boot/kernel.asm @@ -204,6 +204,15 @@ ldbpb: push ds pop ds 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 ; IN al character to print fputc: push ax @@ -215,7 +224,7 @@ fputc: push ax pop ax iret -main: hlt +main: int 0x28 jmp main init: cli @@ -253,5 +262,5 @@ init: cli ivects: dw int20h, int21h, iret, iret dw iret, iret, iret, iret - dw iret, fputc, iret, iret + dw idle, fputc, iret, iret dw iret, iret, iret, iret