| |||||
Technical Support Support Resources
Product Information | C166: GENERATING A CALL TO AN ABSOLUTE MEMORY LOCATIONInformation in this article applies to:
QUESTIONI need to call a routine at address 0x100000. Is there a way to do this in C? ANSWERYes. The following statement generates call to a function at address 0x100000. ((void (far *) (void)) 0x100000) (); The function called is a far function and must return with a RETS instruction. In the SMALL and COMPACT memory models, you must declare this function as a far function. For example:
void far func (void) {
// your code goes here
}
SEE ALSO
Last Reviewed: Tuesday, June 26, 2007 | ||||
| |||||