Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

About compilerflags

1 view
Skip to first unread message

Rainer Bettsteller

unread,
Jan 30, 2005, 7:43:25 AM1/30/05
to
Hi,

Hm, the replay function in google does not work ....

After reading MeyerK's message, I did some tests about the flag:
XCCOMFLAGS = -WDE
I wrote a little library:

----------------
int globalInteger; // it is in the libraries dgroup

extern void EXPORT WDESetValue(int val) {
globalInteger = val;
}

extern int EXPORT WDEGetValue(void) {
return globalInteger;
}
------------------

Compiled with -WDE, there are no problems. Compiled without -WDE, the
test application crashes (while closing it).

By checking the DS register in the libray and in the calling geode, I
found that the DS register value differs, if the -WDE flag is set.
Without -WDE, the DS value in the libray is the same as in the calling
geode. This means, the -WDE flag forces every routine to load the
libraries dgroup into the DS register, while without -WDE the DS will
point to the calling geodes dgroup.

If you won't use the -WDE flag, you have to access to global variables
of the library by doing this (code is tested):

-----------------------------------------
int globalInteger;

extern void EXPORT WDESetValue(int val) {
int val;

asm push ds
GeodeLoadDGroup(GeodeGetCodeProcessHandle());
globalInteger = val;
asm pop ds

}

extern int EXPORT WDEGetValue(void) {
int val;

asm push ds
GeodeLoadDGroup(GeodeGetCodeProcessHandle());
val = globalInteger;
asm pop ds
return val;

}

--------------------------------------------

All expainations above are experimental results. Therefore, it would
be interesting if there is a explaination about all useful flags for
XCCOMFLAGS
XGOCFLGAS
LINKFLAGS
and other - if there are any
Is there a full explaination about the local.mk (and other makefiles?)
in the SDK documentation?

And, very important: While scanning some *.mk files, i found a XREF
entry in a GEOS.MK file. Is there a XREF tool for the GOC code?

Regards
Rainer

0 new messages