Closed ygrayne closed 2 years ago
Thank you for your report.
This code has been taken verbatim from NW's ORTool
:
https://schierlm.github.io/OberonXref/ProjectOberon2013/ORTool.html#L_138
I assume the background is that the original Oberon machine has 1MB of RAM, so any larger addresses would "wrap around".
But you are right, there are 24 bits for the offset in the instruction, so the code could be changed. Do you want to send a pull request or do you prefer me doing the change myself?
May I ask you to do the change? Thanks. (Sorry for the late reply. Busy times.)
Unless I miss something, I think in the case 'k = 3' and 'u = 1' this ' w := w MOD 100000H' should read 'w := w MOD 1000000H', ie. "capture" 24 bits for the offset, and the corresponding checks and adjustments for negative values adjusted accordingly.