What I meant is that his example code could be changed from:psycopathicteen wrote:I'm still confused on what Bregalad said.
Code: Select all
; put $1234 on the stack
lda #<$1234
sta STACK0, x
lda #>$1234
sta STACK1, x
; put $1337 on the top of the stack
lda #<$1337
sta TOS
lda #>$1337
sta TOS+1
jmp add2Code: Select all
jsr Pushconst
.dw $1234
jsr Pushconst
.dw $1234
jmp add2
Code: Select all
.db PUSHCONST
.dw $1234
.db PUSHCONST
.dw $1234
.db ADD2
Note quite. Sweet16 is based on a register machine, not a stack machine.I imagine it would work like in Sweet16. Sweet16 is a virtual assembly language.