www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/04/09/04:37:40

From: "A.Appleyard" <A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk>
To: djgpp AT delorie DOT com
Date: Tue, 9 Apr 1996 09:32:52 GMT
Subject: Re: Accessing a Memory Location
Message-ID: <BF91DE2B2A@fs2.mt.umist.ac.uk>

  mchyzer AT red DOT seas DOT upenn DOT edu (Michael C Hyzer) wrote (Subject: Accessing a
Memory Location):-
> I am running the same gcc for DOS on my pentium desktop and 386 laptop. I am
> trying to write to the address of the parallel port (0x0378 on both). ... on
> the desktop, with a command such as: `int *para = (char*)0x0378;'. This line
> causes a segmentation violation on the laptop ...

  Ports aren't the same as ordinary RAM addressses!!!!!!!!!!!!!! To read and
write ports, use special functions in #include<pc.h> (= djgpp\include\pc.h)

- Raw text -


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