Mail Archives: djgpp/1995/03/22/16:56:27
>I need your advice on how to use the keyboard. I am making a game which needs,
I
>think, the intercetion of the keyboard interruption (mainly to know the state
of
>the UP, DOWN, LEFT and RIGHT arrows). The problem is that i don't know how the
>interruptions exactly work in protected mode. If somebody has already done
some
>procedures that can intercept the keyboard, it would be kind to send me the
>sources. If anybody knows how I can do without using interrupts, please tell
me.
For many purposes, calling the BIOS's interrupt 0x16 should be adequate
(precondition: AH=0x10; postconditions: AH=scan code, AL=ASCII code).
BTW, your lines are at least 5--10 characters too long...you need to leave
some room for quoting, etc.
--- Aaron Ucko (ucko AT vax1 DOT rockhurst DOT edu; finger for PGP public key) | httyp!
Geek code 2.1 [for explanation, finger hayden@ | `God's Laws' (Rudy Rucker,
vax1.mankato.msus.edu]: GCS/M/S d(-) H s g+ p? \ _Master of Space and Time_):
!au a17 w+ v+(++) C++(+++)>++++ UL++(S+)>++++ \ 1) Be clean. 2) Follow Gary.
P+(++) L++ 3(-) E- N+(++) K- W--(---) M-@ V-(--) \ 3) Teach God's Laws.
po-(--) Y+ t(+) !5 j(++) R(-) G' tv--(-) b+++ +---------------------------
!D(--) B--(---) e>++++(*) u++(@) h!() f(+) r-(--)>+++ n+(-) y?
- Raw text -