flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > What's the most elegant way to monitor key presses in RM? |
Author |
|
zhak 20 Jul 2006, 16:53
I found the solution at last... I intercepted INT 9:
Code: int_9: push ax ;save AX 'cause it may be in use somewhere in al, 60h cmp al, 81h ;break code for ESC jnz @f add sp, 4 push cancel mov al, [041Ah] ;clear kbd buffer because Int 16h Fn 1 will mov [041Ch], al ;return previous keypress immediately sub sp, 2 @@: pop ax jmp dword [cs:int9] ;execute default INT 9 handler. CS is used because ;I use the same segment for code and data I deleted the previously submitted peace of code because it was wrong. This routine seems to be working correctly... I hope it's so |
|||
20 Jul 2006, 16:53 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.