Added reversed colors in status bar, to improve visual

This commit is contained in:
giomba 2017-12-22 16:47:06 +01:00
parent 0abfb0c345
commit d28e93f54e

View File

@ -96,9 +96,11 @@ start:
sta $d020 ; overscan sta $d020 ; overscan
lda #9 lda #9
sta $d021 ; center sta $d021 ; center
; Upper bar ; Upper bar -- fill with reversed spaces, color yellow
ldx #39 ldx #39
upperbarLoop: upperbarLoop:
lda #$a0 ; reversed color space
sta $400,x
lda #7 lda #7
sta $d800,x sta $d800,x
dex dex
@ -560,12 +562,14 @@ printDigit:
bcs printDigitL ; if it is not a decimal digit, then go to printDigitL bcs printDigitL ; if it is not a decimal digit, then go to printDigitL
clc ; it is a decimal digit! Just add `0` (48) clc ; it is a decimal digit! Just add `0` (48)
adc #48 adc #48
ora #$80 ; reverse color
rts rts
printDigitL: ; it is not a decimal digit, then... printDigitL: ; it is not a decimal digit, then...
sec sec
sbc #10 ; take away 10 sbc #10 ; take away 10
clc clc
adc #1 ; add 1, so you obtain something in [A-F] adc #1 ; add 1, so you obtain something in [A-F]
ora #$80 ; reverse color
rts rts
; Print null-terminated string on status bar ; Print null-terminated string on status bar
@ -581,6 +585,7 @@ printStatusLoop:
printStatusSkipSpace: printStatusSkipSpace:
sec sec
sbc #$40 ; convert from standard ASCII to Commodore screen code sbc #$40 ; convert from standard ASCII to Commodore screen code
ora #$80 ; reverse color
sta $413,y sta $413,y
iny iny
jmp printStatusLoop jmp printStatusLoop