After a 1-year hiatus which started with the birth of my daughter, I'm getting back into Amiga programming again.
I have a newbie question:
What's the best way to take over the Amiga keyboard in C? In GameSmith's examples, they have this nasty looking code:
Code:
// BAD PRACTICE ALERT! ptr to hardware keyboard reg
unsigned char *keybrd=(unsigned char *)0xbfec01;
unsigned char key;
.
.
.
key = *keybrd;
// escape key pressed
if( key == 0x75 ) return(1);
It appears that some key-strokes are still sent to the Shell when the game runs, which is not ideal.
So what's the correct way?