work on screen char output
This commit is contained in:
1 parent
603d02546b
commit
d82907bdc3
2 files changed
+36
-15
No files matched your search
@@ -29,12 +29,12 @@ chrout_screen:
|
|||||||
bcc !+
|
bcc !+
|
||||||
|
|
||||||
and #$7F
|
and #$7F
|
||||||
jmp output_literal_char // not high char
|
jmp chrout_screen_literal // not high char
|
||||||
|
|
||||||
!:
|
!:
|
||||||
// Range $20-$3F is unchanged
|
// Range $20-$3F is unchanged
|
||||||
cmp #$40
|
cmp #$40
|
||||||
bcc output_literal_char // not high char
|
bcc chrout_screen_literal // not high char
|
||||||
|
|
||||||
// Unshifted letters and symbols from $40-$5F
|
// Unshifted letters and symbols from $40-$5F
|
||||||
// all end up being -$40
|
// all end up being -$40
|
||||||
@@ -49,42 +49,63 @@ chrout_screen:
|
|||||||
|
|
||||||
// Fix shifted chars by adding $20 again
|
// Fix shifted chars by adding $20 again
|
||||||
cmp #$20
|
cmp #$20
|
||||||
bcc output_literal_char // not high char
|
bcc chrout_screen_literal // not high char
|
||||||
cmp #$40
|
cmp #$40
|
||||||
bcs output_literal_char // not high char
|
bcs chrout_screen_literal // not high char
|
||||||
clc
|
clc
|
||||||
adc #$20
|
adc #$20
|
||||||
|
|
||||||
output_literal_char: /* YYY disabled for rework
|
// FALLTROUGH
|
||||||
|
|
||||||
|
chrout_screen_literal:
|
||||||
|
|
||||||
// Write normal character on the screen
|
// Write normal character on the screen
|
||||||
|
|
||||||
pha
|
tax // store screen code, we need .A for calculations
|
||||||
|
|
||||||
ldy PNTR
|
// First we need offset from PNT in .Y, we can take it from PNTR (0-79)
|
||||||
ora RVS // Compute's Mapping the 64 p38
|
|
||||||
|
lda PNTR
|
||||||
|
cmp #40
|
||||||
|
bcc !+
|
||||||
|
sec
|
||||||
|
sbc #40
|
||||||
|
!:
|
||||||
|
tay
|
||||||
|
|
||||||
|
// Put the character on the screen
|
||||||
|
|
||||||
|
txa
|
||||||
|
ora RVS // Computes Mapping the 64, page 38
|
||||||
sta (PNT),y
|
sta (PNT),y
|
||||||
|
|
||||||
// Decrement number of chars waiting to be inserted
|
// Decrement number of chars waiting to be inserted
|
||||||
|
|
||||||
lda INSRT
|
lda INSRT
|
||||||
beq !+
|
beq !+
|
||||||
dec INSRT
|
dec INSRT
|
||||||
!:
|
!:
|
||||||
pla
|
// Toggle quote flag if required
|
||||||
|
|
||||||
|
txa
|
||||||
cmp #$22
|
cmp #$22
|
||||||
bne not_quote
|
bne !+
|
||||||
|
|
||||||
// Toggle quote flag if required
|
|
||||||
lda QTSW
|
lda QTSW
|
||||||
eor #$80
|
eor #$80
|
||||||
sta QTSW
|
sta QTSW
|
||||||
|
!:
|
||||||
|
// Set colour of the newly printed character
|
||||||
|
|
||||||
not_quote:
|
|
||||||
|
|
||||||
// Set colour
|
|
||||||
lda COLOR
|
lda COLOR
|
||||||
sta (USER),y
|
sta (USER),y
|
||||||
|
|
||||||
|
|
||||||
|
jmp !-
|
||||||
|
|
||||||
|
|
||||||
|
/* YYY disabled for rework
|
||||||
|
|
||||||
// Advance the column, and scroll screen down if we need
|
// Advance the column, and scroll screen down if we need
|
||||||
// to insert a 2nd line in this logical line.
|
// to insert a 2nd line in this logical line.
|
||||||
// (eg Compute's Mapping the 64 p41)
|
// (eg Compute's Mapping the 64 p41)
|
||||||
|
|||||||
@@ -17,4 +17,4 @@ chrout_screen_quote:
|
|||||||
bcc !+
|
bcc !+
|
||||||
adc #$BF // C=1, so adding $BF + C = add $C0
|
adc #$BF // C=1, so adding $BF + C = add $C0
|
||||||
!:
|
!:
|
||||||
jmp output_literal_char
|
jmp chrout_screen_literal
|
||||||
Reference in new issue
Block a user