delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
Date: | Wed, 23 Feb 2005 11:47:34 +0100 |
From: | Gisle Vanem <giva AT bgnett DOT no> |
Subject: | Re: Differences in LPT1 base address in protected/real mode? |
To: | djgpp AT delorie DOT com |
Message-id: | <0b4a01c51995$14f74ca0$0600000a@broadpark.no> |
MIME-version: | 1.0 |
X-MIMEOLE: | Produced By Microsoft MimeOLE V6.00.2900.2180 |
X-Mailer: | Microsoft Outlook Express 6.00.2900.2180 |
X-Priority: | 3 |
X-MSMail-priority: | Normal |
References: | <ac2773cb DOT 0502230222 DOT 656c5cf3 AT posting DOT google DOT com> |
Reply-To: | djgpp AT delorie DOT com |
"Karl-Heinz Pischke" wrote: > if I try to get the LPT1 base address at 0x408 with inportw I get > FFFFh back instead of the expected 7803h ... as I googled around just > now I found out that there is a significant difference in the > addressing of memory between real and protected mode ... I guess this > is the crux of the 'phenomenon' ... unfortunately I didn't found any > document so far that could help me with finding the correct address of > 0040h:0008h in the protected mode ... is anyone here in the know how > to get the LPT1 base adress from bios in protected mode? DOS memory (range 0-1MB physical) must be refered to using the _dos_ds selector. For example: #include <sys/farptr.h> #include <go32.h> unsigned short base = _farpeekw (_dos_ds, 0x408); --gv
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |