Shop OBEX P1 Docs P2 Docs Learn Events
multiple RRs in w — Parallax Forums

multiple RRs in w

Armored CarsArmored Cars Posts: 172
edited 2005-09-28 15:41 in General Discussion
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.

Comments

  • Armored CarsArmored Cars Posts: 172
    edited 2005-09-28 13:14
    Also 'nother question. Its unrelated but can a variable be used to access a register. For example setting FSR to $20 and then using a register to access $10-$1F

    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?
  • BeanBean Posts: 8,129
    edited 2005-09-28 13:53
    You can do "RR WREG" but you must make sure the OPTION register is set to give access to W instead of RTCC

    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
    ·
  • Armored CarsArmored Cars Posts: 172
    edited 2005-09-28 15:41
    Second post:

    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?
Sign In or Register to comment.