Literals/String: Difference between revisions
m
→{{header|6502 Assembly}}: formatting for additional clarity. Why doesn't 6502 highlight opcodes?
Puppydrum64 (talk | contribs) m (→{{header|6502 Assembly}}: forgot to close language) |
Puppydrum64 (talk | contribs) m (→{{header|6502 Assembly}}: formatting for additional clarity. Why doesn't 6502 highlight opcodes?) |
||
Line 53:
iny ;next character
jmp PrintString ;back to top
Terminated:
rts ;exit
HandleSpecialChars:
iny ;next char
lda (StringPtr),y
cmp #'n'
beq NextLine ;unimplemented new line routine, it ends in "JMP DoneSpecialChar."
;Typically this would reset the x cursor and increment the y cursor, which are software variables that
DoneSpecialChar▼
;get converted to a VRAM address in some other routine.
▲DoneSpecialChar:
iny
jmp PrintString ;jump back to top. Notice that neither the backslash nor the character after it were actually printed.</lang>
|