schierlm / Oberon2013Modifications

Modifications (I deliberately do not call them enhancements) I did to Project Oberon 2013.
Other
14 stars 5 forks source link

DebugTools.DisasmOpcode #9

Closed ygrayne closed 2 years ago

ygrayne commented 2 years ago

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.

schierlm commented 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?

ygrayne commented 2 years ago

May I ask you to do the change? Thanks. (Sorry for the late reply. Busy times.)