1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-07 07:29:33 +00:00
cc65/test/val/jmp-callax.c

22 lines
275 B
C
Raw Permalink Normal View History

static unsigned char val;
static void foo(void) {
val = 5;
}
2019-04-14 16:45:53 +00:00
static void wrap(void) {
asm("lda #<%v", foo);
asm("ldx #>%v", foo);
asm("jmp callax");
}
2019-04-14 16:45:53 +00:00
int main(void) {
val = 0;
wrap();
return val == 5 ? 0 : 1;
}