Mail Archives: djgpp/1996/08/08/20:25:03
Reply to message 6938110 from JOELS AT TWAVE DOT N on 08/04/96 9:53AM
>#define JOYPORT 0x201 // joyport is at 201 hex
>
>Could someone please explain to me why this fails to read the joystick port.
I
>am following several tutorials and all that
>I have read indicates that this should work.
Under DPMI you cannot simply access any random absolute
memory address; you must either use far calls or enable
near pointers. Also, under DPMI hardware ports are NOT
accessible as flat memory addresses; you must use the inport*
and outport* functions.
I suggest you read section 18 of the DJGPP FAQ list (available
as 'v2/faq201b.zip' from your local SimTel mirror).
John
- Raw text -