X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: Another GAS problem Date: 15 Apr 2002 15:13:21 GMT Organization: Aachen University of Technology (RWTH) Lines: 28 Message-ID: References: NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 1018883601 9449 137.226.32.75 (15 Apr 2002 15:13:21 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 15 Apr 2002 15:13:21 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Jacky Luk wrote: > I have posted on this question in this arena before. In GAS, how > do u load the segment address into ES when dealing with BIOS > interrupts like the 13h ? Most of the time you don't, because the graphics BIOS can't use the internal memory space of your 32bit app anyway, even if you do pass it the right selector. Int 13h is 16bit by nature, and simply doesn't understand 32bit addresses. If you're *sure* your 'bootbuffer' really is in the first 1MB of real memory, you could use symbolic assembler calculation to split it into segment and offset and use those. > movw bootbuffer, %bx <--- I knew this one already > movw -4(%ebp), %ebx Then you know this one incorrectly, I think. -4(%epb) is an address somewhere on the stack, whereas you want to access a *global* variable named 'bootbuffer' and defined elsewhere in your assembly source. > movw .data, %es <-- but what about this? This doesn't exist, because GAS doesn't know anything about segments. It's a 32bit flat world it assumes. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.