Host Engineering Forum
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 21, 2012, 06:13:55 pm


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Accumulator stack question  (Read 962 times)
Mickster
Newbie
*
Posts: 1


« on: April 29, 2008, 06:22:20 pm »

Is the data in an accumulator stack retained from scan to scan?
Logged
MikeS
Host Moderator
*****
Posts: 176



WWW
« Reply #1 on: April 30, 2008, 10:06:09 am »

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.
Logged

Good design costs a lot. Bad design costs even more.
franji1
Bit Weenie
Host Moderator
*****
Posts: 1034



WWW
« Reply #2 on: April 30, 2008, 04:46:08 pm »

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! Cheesy
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM