Shop OBEX P1 Docs P2 Docs Learn Events
ASM and "bignumber" — Parallax Forums

ASM and "bignumber"

nicolad76nicolad76 Posts: 164
edited 2008-07-07 00:40 in Propeller 1
Hello...
quick question..
All ASM instruction, such as ADD, MOV etc...work on 9 bit register...which means·that the biggest·value I can handle is (2·^ 9) -1...is it correct?

How can I work in ASM with bigger number?...actually i just need to get to 10000 [noparse]:)[/noparse]

Thanks
Nicola

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-07-07 00:20
    All ASM instructions work on 32 bit values. The source field part of the instruction is only 9 bits, so immediate instructions can have values from 0 to 511. If you put the operand in its own memory location and put the address of that location in the instruction, all works as expected (with 32 bits).
  • nicolad76nicolad76 Posts: 164
    edited 2008-07-07 00:40
    OH! ... It must be to hot over here [noparse]:)[/noparse]
    You are right, of course...my brain must be on vacation [noparse];)[/noparse]
    Thanks!
Sign In or Register to comment.