1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-09-09 08:54:40 +00:00
kickc/src/test/ref/bool-pointer.asm
2020-02-23 09:44:36 +01:00

26 lines
381 B
NASM

// Tests a pointer to a boolean
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
main: {
// bscreen[0] = true
lda #1
sta $400
// bscreen[1] = false
lda #0
sta $400+1
// *bscreen = true
lda #1
sta $400+2
// if(*bscreen)
cmp #0
bne __b1
rts
__b1:
// *(++bscreen)= true
lda #1
sta $400+3
// }
rts
}