Mail Archives: djgpp/1996/04/09/04:37:40
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 -