Hello Everyone,
This is my first of many posts so hopefully i hope no one gets tierd of me. Ok now that thats over with, On With the Show!!
I have a Few questions about running loops.
1. When an index register has finshed its loop and goes on the next instruction, does the that index register ,pardon my french ," stay closed" when it branches back to continue the loop?
2. Do you have to clear out the index register everytime you want to load a new value, how long will the value stay in the register?
3. Up to how much data or routines can the accumulator contain at any given time?
Running Loops
Re: Running Loops
nineTENdo wrote:
1. When an index register has finshed its loop and goes on the next instruction, does the that index register ,pardon my french ," stay closed" when it branches back to continue the loop?
Code: Select all
Init LDX #$FF ; initialize the index register to 255
Loop LDA $C000,X ; load some data values in Accum.
...
... manipulate the data
DEX ; dec index register
BNE Loop ; if index <> 0, then do the loop again.
... post loop code starts here
Quote:
2. Do you have to clear out the index register everytime you want to load a new value, how long will the value stay in the register?
Quote:
3. Up to how much data or routines can the accumulator contain at any given time?
Daryl