Creating functions in data space
John Williams 223-3402
williams at kirk.DEC
Tue Mar 4 23:08:56 AEST 1986
In response to George Tomasevich:
I will say right off that bat that I haven't tried this. It
appears to me, however, that the problem is how C handles memory
management. This seems to me to be very machine dependent, even compiler
dependent. I'm sure that the compiler, in any event, would spit all
kinds of warnings at you. Perhaps a way around it would be to gain
access somehow to the memory management register, have a function that
flips a bit just before calling the data code, and cleans up afterwards.
Perhaps the problem is that C allows you to have identically named
functions and variables, but you could get around that as well.
Perhaps the function that calls the coded data should be written
in assembly, to account for the machine dependency, with conditional
linking to maintain portability. I'm not convinced that the whole
thing can be done in C, but by the same token, I don't see that the
whole thing has to be written in assembly, either.
John.
More information about the Comp.lang.c
mailing list