GDCC icon indicating copy to clipboard operation
GDCC copied to clipboard

Far Pointers

Open DavidPH opened this issue 6 years ago • 0 comments

Being able to have a pointer type that crosses address spaces would be potentially useful in edge cases. Currently planning on doing a three-word solution. One word for type, one for the array/string number, and one for the index. Ideally, the index should be pushed last in order to simplify codegen. Overflowing the index will be considered UB.

One issue that stands is the inability to address module arrays, as their addresses are module-specific. A solution to that would be interesting, as it would open up a __mod_ars address space to go with __hub_ars and __gbl_ars. At present, however, I can think of no general solution. Ideas would be appreciated.

DavidPH avatar Jan 08 '19 16:01 DavidPH