flat assembler
Message board for the users of flat assembler.

Index > OS Construction > Masking alt - del

Author
Thread Post new topic Reply to topic
GhostXoPCorp



Joined: 13 Dec 2008
Posts: 199
Location: 01F0:0100
GhostXoPCorp 15 Jun 2009, 00:55
is there a way that i could mask alt del to not restart the computer in real mode?

_________________
Oh that divide overflow. Just jumps out of the bushes every time to scare the day lights out of me.
Post 15 Jun 2009, 00:55
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20303
Location: In your JS exploiting you and your system
revolution 15 Jun 2009, 01:00
Do you mean CTRL-ALT-DEL?

In real mode you can just take over the kdb interrupt and do what you like with the keystrokes. When you see DEL pressed and CTRL and ALT are already down then just bypass the callback into the BIOS so that the keystroke is ignored.
Post 15 Jun 2009, 01:00
View user's profile Send private message Visit poster's website Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 15 Jun 2009, 01:37
Quote:

In real mode you can just take over the kdb interrupt and do what you like with the keystrokes. When you see DEL pressed and CTRL and ALT are already down then just bypass the callback into the BIOS so that the keystroke is ignored.

Can you really forward the interrupt 9 to the BIOS after doing this? I mean, what keyboard controller state the BIOS will receive if you had to read the keyboard port first?
Post 15 Jun 2009, 01:37
View user's profile Send private message Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 789
Location: Adelaide
sinsi 15 Jun 2009, 02:10
Best way is to hook int 15h, AH=4fh
Quote:

called by INT 09 handler to translate scan codes; the INT 09 code does not examine the scan code it reads from the keyboard until after this function returns.
Post 15 Jun 2009, 02:10
View user's profile Send private message Reply with quote
GhostXoPCorp



Joined: 13 Dec 2008
Posts: 199
Location: 01F0:0100
GhostXoPCorp 15 Jun 2009, 03:12
is there a way where i can check the buffer for ctrl alt del or just alt del and then jump back into getting keys, or is reprogramming the keyboard controller inturrupt the only way?
ps alt del restarts the system also

_________________
Oh that divide overflow. Just jumps out of the bushes every time to scare the day lights out of me.
Post 15 Jun 2009, 03:12
View user's profile Send private message Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 789
Location: Adelaide
sinsi 15 Jun 2009, 03:24
ctrl-alt-del never gets to the buffer, the system is rebooted from within the BIOS's INT 9 handler. Hook int 15, function 4f and check for the delete key then check ctrl and alt. If they are all pressed, you just tell the int9 handler to ignore it and nothing happens.
Post 15 Jun 2009, 03:24
View user's profile Send private message Reply with quote
GhostXoPCorp



Joined: 13 Dec 2008
Posts: 199
Location: 01F0:0100
GhostXoPCorp 15 Jun 2009, 04:53
hows ths, when int 9 call a restart, is the restart it calls in another intturupt? int 19? if so, could i just over write int 19 to ask the user

Restart y)es n)o?

_________________
Oh that divide overflow. Just jumps out of the bushes every time to scare the day lights out of me.
Post 15 Jun 2009, 04:53
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1900
DOS386 15 Jun 2009, 15:23
> just take over the kdb interrupt

or just disable it completely. You still can peek keystrokes then.
Post 15 Jun 2009, 15:23
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.