Post
Topic
Board Altcoin Discussion
Re: Nxt :: Automated Transactions (AT) - progress and discussion
by
Zahlen
on 21/02/2014, 12:11:53 UTC
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!


I'm sorry, I don't think I can.  Cheesy Spec needs to be pc = addr3, without the $.

Maybe it's my use of the variable name "addr3" that's the confusion; addr3 is supposed to be a value representing an address, not the value pointed to by an address. It should behave like JUM_ADR. (I do math mainly, not coding, so I'm not used to naming conventions.) So maybe

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

would remove any confusion?