1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-16 21:07:56 +00:00
kickc/src/test/ref/inline-asm-refout-const.asm
2020-02-23 09:44:36 +01:00

19 lines
352 B
NASM

// Illustrates how inline assembler can reference data from the outside program without the data being optimized away as unused
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
.label SCREEN = $400
main: {
// asm
ldx #0
!:
lda table,x
sta SCREEN+1,x
inx
cpx #4
bne !-
// }
rts
}
table: .text "cml!"