Shop OBEX P1 Docs P2 Docs Learn Events
How many WORD variables can I use ? ( I have the Basic Stamp 2SX) — Parallax Forums

How many WORD variables can I use ? ( I have the Basic Stamp 2SX)

JoeJoe Posts: 184
edited 2006-10-24 21:46 in BASIC Stamp
Hi:

How many WORD variables can I use
with the Basic Stamp 2SX ?

I know that the Basic Stamp 2 -IC can use
13 WORD variables but I don't know about
the Basic Stamp 2SX.


Thanks, Joe

Comments

  • Tracy AllenTracy Allen Posts: 6,662
    edited 2006-10-24 21:46
    That is also 13 word variables, but the 2sx also has 63 bytes of scratchpad RAM that you can use for additional temporary storage. A program accesses the scratchpad via the GET and PUT instructions, from and to one of the 26 bytes or 13 words in the main memory. You can't use the scratchpad memory directly instatements like x = x+1, but,
    my_extra CON 40 ' location address in scratchpad
    x VAR Word
    GET my_extra, Word x
    PUT my_extra, Word x+1

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
Sign In or Register to comment.