Shop OBEX P1 Docs P2 Docs Learn Events
Question — Parallax Forums

Question

Armored CarsArmored Cars Posts: 172
edited 2005-11-14 14:46 in General Discussion
Will using a variable in bank 0 affect w?

Comments

  • Armored CarsArmored Cars Posts: 172
    edited 2005-11-14 13:44
    I don't mean to ask stupid questions but my SX is at home and the SX Sim doesn't work.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2005-11-14 14:46
    The question is a bit vague. There is at least one register in Bank 0 that can be configured to directly impact W in some situations [noparse][[/noparse]it is the $01 or RTCC register]. If you mean that particular register, I would think 'definitely YES'.

    If you are thinking about using the top end of the register for variables, I think it depends on where you are in Bank 0.
    And it depends on the particular SX - SX-18/20 , SX-28, SX-48, and SX-52 use different amounts of Bank 0 for I/O.

    From what I can glean from the books, it is usually easiest to use other banks until you really need to use Bank 0's top end. In that way you are really avoiding messy development problems at the beginning. As you refine your code, you become more aware of how to compact your register use. Then, if needed, you can call upon Bank 0

    Anyone is free to correct me if I am wrong about this.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan

    Post Edited (Kramer) : 11/24/2005 3:06:32 PM GMT
Sign In or Register to comment.