multiple RRs in w
Armored Cars
Posts: 172
In order to do animations for·my clock (numbers rotate up or down) I want to take the contents of a register and rotate it in w so I won't have to use extra registers.
There will be a loop that counts down from 8.· The picture will be set in 24 registers which will be rotated down 8 times, then 7 and so on in w.·(c will be·cleared every time to prevent it from apearing and rotating off the top of the·screen at the same time)·This makes the picture rotate up on to the display without distroying the origional registers and requiring extra registers.· Hopefully there is some way to rotate w but so far I have been unsuccessful.· In the development system manual it doesn't specifically say w can or cannot be rotated, so I do really know.
There will be a loop that counts down from 8.· The picture will be set in 24 registers which will be rotated down 8 times, then 7 and so on in w.·(c will be·cleared every time to prevent it from apearing and rotating off the top of the·screen at the same time)·This makes the picture rotate up on to the display without distroying the origional registers and requiring extra registers.· Hopefully there is some way to rotate w but so far I have been unsuccessful.· In the development system manual it doesn't specifically say w can or cannot be rotated, so I do really know.
Comments
For example:
org $0A
counter ds 1
start
mov $10,counter
inc counter
inc counter
mov some # into register number of counter or will I need to define register every time?
I don't follow your what you want to do in your second post ???
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95
http://www.parallax.com/detail.asp?product_id=30012
Product web site: www.sxvm.com
Available now... SX-Video OSD module $59.95 www.sxvm.com
"I'm a man, but I can change, if I have to, I guess"
Red Green
·
Setting FSR to $20 will acess bank 2. I will use $10-$1C in bank 2, 3, and 4 through loops, setting FSR each time ($20-$2C, $30-$3c, ect) would be inefficient and take up extra space.
The only way I know to write to a register besides defining it and using FSR is
mov $12,#$FF
for example.
Is there any way I can use a variable in place of the $12?
Looking back I mistyped my example...
I there a way I can write to a register depending on the contents of a variable?
or
Can I use a variable to point to a register without modifying FSR?