// Tests creating and assigning pointers to non-args no-return functions - plus inline kickasm-based calling

void main() {
    const byte* SCREEN = $400;

    void()* f;

    byte i = 0;
    while(true) {
        ++i;
        if((i&1)==0) {
            f = &fn1;
        } else {
            f = &fn2;
        }
        kickasm(uses f) {{
            jsr ff
        }}
    }
}

kickasm {{
ff:
    jmp (main.f)
}}

void fn1() {
    const byte* BORDERCOL = $d020;
    (*BORDERCOL)++;
}

void fn2() {
    const byte* BGCOL = $d021;
    (*BGCOL)++;
}