mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-11-16 21:07:56 +00:00
19 lines
352 B
NASM
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!"
|