Re: [cc65] function pointer, fastcall

From: Oliver Schmidt <ol.sc1web.de>
Date: 2008-08-29 11:11:18
Hi,

> If you think about 80x86 architectures, "far" could mean "segmented" while
> "near" could mean a 16 or 32 bit pointer without a segment.

And several compilers additionally supported "huge" meaning that
pointer arithmetic was perfomed on the segment too - with an offset of
0x100 or 0x8 depending on real mode or protected mode, where
neighboring descriptor table entries had to be allocated.

And the compilers allowed to adjust the default being "near" or "far"
separately for code and data resulting in four distinct "memory
models", but on Windows you needed MakeProcInstance() for far code -
or "just" load the DS register from the SS register, which was
originally published by Michael Geary: http://www.geary.com/fixds.html

... okay, I certainly got carried far away ;-))

Best, Oliver
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Aug 29 11:11:26 2008

This archive was generated by hypermail 2.1.8 : 2008-08-29 11:11:28 CEST