1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-10-21 17:24:39 +00:00
kickc/src/test/ref/function-pointer-noarg-call-4.asm
2020-05-02 11:38:51 +02:00

26 lines
417 B
NASM

// Tests creating, assigning returning and calling pointers to non-args no-return functions
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
main: {
ldx #0
__b2:
// (*getfn(++i))();
inx
// getfn(++i)
jsr getfn
// (*getfn(++i))()
jsr fn1
jmp __b2
}
fn1: {
.label BORDER_COLOR = $d020
// (*BORDER_COLOR)++;
inc BORDER_COLOR
// }
rts
}
getfn: {
rts
}