www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/02/11:28:24

Message-ID: <001301be4ec9$0525a9e0$9fbc98ce@waldroni>
From: "Isaac Waldron" <waldroni AT lr DOT net>
To: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Cc: <djgpp AT delorie DOT com>
Subject: Re: Accessing Constants in Assembly Code
Date: Tue, 2 Feb 1999 11:28:07 -0500
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3155.0
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0
Reply-To: djgpp AT delorie DOT com

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


- -----Original Message-----
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Isaac Waldron <waldroni AT lr DOT net>
Cc: djgpp AT delorie DOT com <djgpp AT delorie DOT com>
Date: Monday, February 01, 1999 12:58 AM
Subject: Re: Accessing Constants in Assembly Code


>
>On Sun, 31 Jan 1999, Isaac Waldron wrote:
>
>> >> C:\waldroni\projects\graphics>gxx -o testc.exe testc.cc
- -lgraphics
>> >> c:/djgpp/lib/libgraphics.a(blit.o)(.text+0x4):../src/blit.s:
>> >> undefined reference to `VideoRAM'
>[snip]
>>     movl %eax,_VideoRAM
>>     leave
>>     ret
>> 
>> So, the symbol _VideoRAM (which points to a 4-byte area of the data
>> segment) should be able to be accesed from my assembler code as
>> _VideoRAM, right?
>
>Right.
>
>But the error message from the linker came from blit.s, and it
>references `VideoRAM', not `_VideoRAM'.  Can it be that blit.s didn't
>prepend the underscore?

The only line that accesses VideoRAM in blit.s appears as such:

mov eax,[_VideoRAM] (NASM syntax)

So, the underscore is there, but I don't see why it won't access that
memory.  I'll probably ask the NASM guys about this one after this.

Thanks for all your help,
Isaac Waldron

-----BEGIN PGP SIGNATURE-----
Version: PGP Personal Privacy 6.0.2

iQA/AwUBNrcnllvPBN9ggn+IEQKWAgCgnsAmj5kmYC/C+uYK3+oTib9LSfoAoPkP
YaYQS+T2S1obOHNZGSLn2j1p
=+Yu7
-----END PGP SIGNATURE-----


- Raw text -


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