1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-06-03 07:29:37 +00:00
kickc/src/test/ref/asm-culling-jmp.asm
2023-04-23 10:09:42 +02:00

24 lines
611 B
NASM

// Example of inline ASM where a JMP is erronously culled during compilation
// https://gitlab.com/camelot/kickc/issues/302
// Commodore 64 PRG executable file
.file [name="asm-culling-jmp.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(main)
.segment Code
main: {
// asm
jmp qwe
.byte 0, $19, $33, $4c, $66, $80, $99, $b3, $cc, $e6
qwe:
lda #$32
// *((char*)0x0400) = 'c'
lda #'c'
sta $400
// }
rts
}