Added support for ASCII spaces in printing function

This commit is contained in:
giomba 2017-12-21 17:03:37 +01:00
parent 6bb4a5151a
commit 3c91f4f8d6

View File

@ -69,7 +69,7 @@ foodColor:
BYTE #15 BYTE #15
gameoverString: gameoverString:
BYTE "GAMEOVER" BYTE "GAME IS OVER"
BYTE #0 BYTE #0
; List ; List
@ -534,6 +534,10 @@ printStatus:
printStatusLoop: printStatusLoop:
lda (printStatusString),y lda (printStatusString),y
beq printStatusEnd beq printStatusEnd
cmp #$20
bne printStatusSkipSpace
lda #$60
printStatusSkipSpace:
sec sec
sbc #$40 ; convert from standard ASCII to Commodore screen code sbc #$40 ; convert from standard ASCII to Commodore screen code
sta $413,y sta $413,y