So I wrote a proof-of-concept "help" program, and at some point things just get confused. It just cats text to the screen... what could possibly go wrong??
I figure I'm too close to the code, PLUS there's something subtle about assembly language that trips up my newbie asm mind.
I've abbreviated the data section, because, you know.
;
; cl65 -o help.prg -t cx16 -C cx16-asm.cfg help.s
;
chrout = $ffd2
; .segment "STARTUP"
; .segment "INIT"
; .segment "ONCE"
; .segment "CODE"
.org $8000
.export LOADADDR = *
Main: ldx #0
lda curpos
loop: jsr $ffd2
inc curpos
lda curpos
cmp #0
beq newline
cmp #42 ; '*' = EOF
bne loop ; no
rts
newline:
lda #13
jmp loop
curpos:
text:
.asciiz "abs(n)"
.asciiz "and; boolean or bitwise"
.asciiz "asc(c$); petscii value"
.asciiz "*** end of file ***"