1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-10-21 02:24:34 +00:00
kickc/src/test/ref/string-escapes-2.asm

32 lines
490 B
NASM
Raw Normal View History

// Test using some simple supported string escape characters in PETSCII
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
.label memA = $ff
main: {
.label i = 2
lda #0
sta.z i
b1:
lda #0
ldy.z i
cmp MESSAGE,y
bne b2
rts
b2:
ldy.z i
lda MESSAGE,y
jsr chrout
inc.z i
jmp b1
}
// chrout(byte register(A) c)
chrout: {
sta memA
jsr $ffd2
rts
}
.encoding "petscii_mixed"
2019-08-18 15:00:26 +00:00
MESSAGE: .text @"hello\nworld\\"
.byte 0