www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/08/20:25:03

From: j DOT aldrich6 AT genie DOT com
Message-Id: <199608090020.AA073580023@relay1.geis.com>
Date: Thu, 8 Aug 96 23:58:00 UTC 0000
To: joels AT twave DOT net
Cc: djgpp AT delorie DOT com
Mime-Version: 1.0
Subject: Re: Help reading the joystick

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019