Host Engineering Forum
General Category => DirectSOFT => Topic started by: Mickster on April 29, 2008, 06:22:20 PM
-
Is the data in an accumulator stack retained from scan to scan?
-
i believe that it is, the accumulator value would only change if an instruction is executed that uses the accumulator, and i don't know of anything that happens at the end or beginning of the scan that would manipulate the accumulator.
-
I know that if an interrupt occurs, the accumulator stack is saved off, then from within the interrupt you can do all the LD/LDA/LD??? instructions you want, then when the IRT (return from interrupt) occurs, it restores the state of the accumulator stack.
I would not utilize this "feature" in your program, because the accumulator stack is meant to be "temporary" and not maintain a "pristine" state.
For example, the OUT box does NOT do a POP, so if you have ANY conditional load instructions from one scan to the next, you have no idea what the state of the accumulator stack is.
STR X0
LD V1400
STR X1
LD V1401
What is the state of the accumulator stack on scan #27? Who knows! :D