Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1 @@
|
|||
db "Hello World"
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
db "Hello World"
|
||||
db $48,$65,$6c,$6c,$6f,$20,$57,$6f,$72,$6c,$64
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
LDA #'A' ;load ascii code of "A" into the accumulator.
|
||||
LDA 'A' ;load the byte stored at memory address 0x41 into the accumulator.
|
||||
|
|
@ -0,0 +1 @@
|
|||
db "Hello World",13,10,0
|
||||
23
Task/Literals-String/6502-Assembly/literals-string-5.6502
Normal file
23
Task/Literals-String/6502-Assembly/literals-string-5.6502
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
PrintString:
|
||||
lda (StringPtr),y
|
||||
beq Terminated
|
||||
cmp #'\' ; a single ascii character is specified in single quotes.
|
||||
beq HandleSpecialChars
|
||||
jsr PrintChar ;unimplemented print routine
|
||||
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
|
||||
;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.
|
||||
Loading…
Add table
Add a link
Reference in a new issue