4 ms·
So if I get this right: the stack is limited in size, and certain "frequent use" routines were labeled as "near" while others with less frequent use were labele
by sova 8y ago
So if I get this right: the stack is limited in size, and certain "frequent use" routines were labeled as "near" while others with less frequent use were labeled as "far" and there was a dynamic way to keep frequent ones in memory?
- ajross 8y agoIt's a 16 bit architecture. Any code that doesn't fit in 64k needs to be in a separate segment. In practice, the way typical C compilers managed this (there were a bunch of code generation options) was to put all the code in a single C/obj file into a separate segment. Calls within the segment were "near" and used the simple CALL/RET variants which took and pushed a 16 bit address. Others were "far" and called/returned to a tuple of an address and a segment descriptor.