mirror of
https://github.com/cc65/cc65.git
synced 2024-11-11 16:07:04 +00:00
22 lines
218 B
C
22 lines
218 B
C
|
static unsigned char val;
|
||
|
|
||
|
static void foo(void) {
|
||
|
val = 5;
|
||
|
}
|
||
|
|
||
|
static void wrap() {
|
||
|
|
||
|
asm("lda #<%v", foo);
|
||
|
asm("ldx #>%v", foo);
|
||
|
asm("jmp callax");
|
||
|
|
||
|
}
|
||
|
|
||
|
int main() {
|
||
|
|
||
|
val = 0;
|
||
|
wrap();
|
||
|
|
||
|
return val == 5 ? 0 : 1;
|
||
|
}
|