Mail Archives: djgpp/1999/02/01/08:20:38
In article <000801be4d5f$66931660$9fbc98ce AT waldroni> you wrote:
> gxx -S mode13.cc
[...]
> Here's the block from mode13.s that appears to define VideoRAM:
> LFE3:
> lcomm _VideoRAM,4
[...]
> call ___dpmi_segment_to_descriptor
> movl %eax,_VideoRAM
> leave
Maybe the problem is that _VideoRAM is not flagged 'global' (i.e. there
is not line 'globl _VideoRAM' in mode13.s, as you show it)?
If my little bit of assembly knowledge didn't deceive me, this means that
VideoRAM is not visible outside of mode13.cc.
I think you'll have to add the 'extern' keyword to your definition of
VideoRAM in mode13.cc. Reading up in the draft C++ language standard
supports this view (From section 3.5, 'Program and linkage'):
---- clip -------
3 A name having namespace scope (_basic.scope.namespace_) has internal
linkage if it is the name of
--an object, reference, function or function template that is explic-
itly declared static or,
--an object or reference that is explicitly declared const and neither
explicitly declared extern nor previously declared to have external
linkage; or
--the name of a data member of an anonymous union.
----- clip ----
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -