AM and ADM destinations

classic Classic list List threaded Threaded
2 messages Options
...
Reply | Threaded
Open this post in threaded view
|

AM and ADM destinations

...
So, as far as I reached, the AM and ADM instructions store data in the A register and in the memory, and in case of ADM also in the D register. But when trying to recode this, should I change the A register before or after commiting changes to the RAM?
Reply | Threaded
Open this post in threaded view
|

Re: AM and ADM destinations

WBahn
Administrator
... wrote
So, as far as I reached, the AM and ADM instructions store data in the A register and in the memory, and in case of ADM also in the D register. But when trying to recode this, should I change the A register before or after commiting changes to the RAM?
After. All register/memory writes reflect the values that were present at the end of the prior instruction.

Be aware that one of the author's emulators violates this behavior. I think it is the A register. I don't recall the details or if the current version of that tool has been fixed. It's a bug that only rears it's head in very unusual circumstances, none of which are relevant to any of the N2T projects, which is why it went undiscovered for so long.