1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-20 02:32:36 +00:00
kickc/src/test/ref/signed-word-minus-byte-2.asm

33 lines
455 B
NASM
Raw Normal View History

2019-05-30 15:55:53 +00:00
// Tests subtracting bytes from signed words
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
main: {
.label screen = $400
.label w1 = 2
ldx #0
lda #<$4d2
sta.z w1
2019-05-30 15:55:53 +00:00
lda #>$4d2
sta.z w1+1
__b1:
lda.z w1
2019-05-30 15:55:53 +00:00
sec
sbc #$29
sta.z w1
lda.z w1+1
2019-05-30 15:55:53 +00:00
sbc #>$29
sta.z w1+1
2019-05-30 15:55:53 +00:00
txa
asl
tay
lda.z w1
2019-05-30 15:55:53 +00:00
sta screen,y
lda.z w1+1
2019-05-30 15:55:53 +00:00
sta screen+1,y
inx
cpx #$b
bne __b1
2019-05-30 15:55:53 +00:00
rts
}