From: "Niklas Pettersson" Newsgroups: comp.os.msdos.djgpp Subject: SV: Absolute addresses Date: Sun, 21 Nov 1999 20:02:19 +0100 Organization: Lund Institute of Technology, Sweden Lines: 36 Message-ID: <819fls$12m$1@news.lth.se> References: NNTP-Posting-Host: npedt97.univ.vxu.se X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hello! You can map any realmode segment into a descriptor that you can use a selector to access. (Use interrupt vector 0x31, function 0x02 and the segment in bx). After that it's just as easy as in realmode to access vga memory. Another way is to use the predefined _dos_ds selector. With this little thing you can access all memory directly (I don't recommend this)... Vga memory is at segment 0xA000 so Absolute adress is 0xA000 * 16 = 0xA0000. The unreal mode described by Davin shouldn't be used..I used to program in it several years ago but it´s much better to use Pm (the protected is great to avoid strange bugs...).. Hope this helps / Niklas Pettersson Ulf Wikström skrev i diskussionsgruppsmeddelandet:mhuY3.4524$r_ DOT 10303 AT nntpserver DOT swip DOT net... > Hi! > I'm using DJGPP with inline assembler, and I'm new on protected mode and > AT&T syntax. There's one thing I don't understand: > How do I specify an absolute memory adress using assembler??? I can't find > the answer anywhere, so it's all up to you proffesionals now :). I would > like to access vga-memory... (this whole idea of a protected mode seems a > little bit crazy to me, is there a method for using 32-bit memory adresses > without using pm?) > > Thanks! Ulf Wikström > >