Clean up Assembly files (#1003)
This commit is contained in:
@@ -1,21 +1,17 @@
|
||||
; goodbyeworld.s for C= 8-bit machines, ca65 assembler format.
|
||||
; String printing limited to strings of 256 characters or less.
|
||||
|
||||
a_cr = $0d ; Carriage return.
|
||||
bsout = $ffd2 ; KERNAL ROM, output a character to current device.
|
||||
a_cr = $0d
|
||||
bsout = $ffd2
|
||||
|
||||
.code
|
||||
|
||||
ldx #0 ; Starting index 0 in X register.
|
||||
ldx #0
|
||||
printnext:
|
||||
lda text,x ; Get character from string.
|
||||
beq done ; If we read a 0 we're done.
|
||||
jsr bsout ; Output character.
|
||||
inx ; Increment index to next character.
|
||||
bne printnext ; Repeat if index doesn't overflow to 0.
|
||||
lda text,x
|
||||
beq done
|
||||
jsr bsout
|
||||
inx
|
||||
bne printnext
|
||||
done:
|
||||
rts ; Return from subroutine.
|
||||
|
||||
rts
|
||||
.rodata
|
||||
|
||||
text:
|
||||
|
||||
Reference in New Issue
Block a user