Post
Topic
Board Altcoin Discussion
Re: Nxt :: Automated Transactions (AT) - progress and discussion
by
CIYAM
on 21/02/2014, 10:07:13 UTC
Actually, that still isn't the subleq branching. SUBLEQ a, b, c means that after you perform a = a - b, if that is <= 0, you goto c, not the address pointed to by c, or advance the code point by c. So you'll want pc = addr3 instead.

Oh - so I changed the code which was actually already correct - doh!

Okay so I'll put the code back the way it was and change the spec. to this:

Code:
SUB_LEQ           0x89   addr1,addr2,addr3      @addr1 -= $addr2, if $addr1 <= 0 then pc = $addr3 (for James)

Please tell me I've got it right this time!