Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/6502/a2_frontend.s
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ AUXUNDOBANK2 = $d0 ; logical page from

; ---- frontend zero page ----

curstyle = $04 ; last style bits set by io_mstyle
nunread = $05 ; lines scrolled off since last clear
ioparam = $06 ; word, used by the engine
wrappos = $08
Expand Down Expand Up @@ -882,8 +883,11 @@ moretxt
.asc "<...>",0

io_mstyle
; style bits are already in rstyle zp var in engine
jmp io_mflush_nostyle
pha
jsr io_mflush
pla
sta curstyle
rts

; TODO consider refactoring with sprogress?
io_mprogress
Expand Down Expand Up @@ -1358,7 +1362,7 @@ gotoxy

mstyle_enter
.(
lda `rstyle
lda curstyle
lsr ; reverse style bit
bcc set_inverse_rts
; fallthrough to set_inverse
Expand Down Expand Up @@ -3065,6 +3069,7 @@ auxclrlp
sta stxoffs
sta cury
sta strow
sta curstyle
#if UNDO
sta u_ready
sta u_count
Expand Down
5 changes: 5 additions & 0 deletions src/6502/engine.s
Original file line number Diff line number Diff line change
Expand Up @@ -3778,6 +3778,11 @@ op_en_lv_span
stx divsp

inc nspan
; ENTER_SPAN emits a pending AUTO/PENDING
; space before entering the span,
; so the space has the outer style.
; op_style does the same thing.
jsr syncspace
done
jsr unstyle
skip
Expand Down
1 change: 1 addition & 0 deletions test/codepoints/codepoints.6502.gold
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ and must leave the other alone.
bold normal bold
italic upright italic
both italic only both
reverse normal reverse
---
The deprecated SET_STYLE/RESET_STYLE
opcodes, which bypass the CSS parser
Expand Down
Binary file modified test/codepoints/codepoints.aastory
Binary file not shown.
7 changes: 7 additions & 0 deletions test/codepoints/codepoints.dg
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@
(style class @fixed)
font-family: monospace;

(style class @reverse)
-iftf-reverse-video: reverse;

(style class @unreverse)
-iftf-reverse-video: none;

%% A font-family that is not monospace must set no bit at all. The name is
%% deliberately one that contains neither 'm' nor a substring of 'monospace',
%% since the matcher scans for the word rather than comparing the whole value.
Expand Down Expand Up @@ -649,6 +655,7 @@
(line) (span @bold) { bold (span @unbold) { normal } bold }
(line) (span @italic) { italic (span @roman) { upright } italic }
(line) (span @bolditalic) { both (span @unbold) { italic only } both }
(line) (span @reverse) { reverse (span @unreverse) { normal } reverse }
(line) ---
(line) The deprecated SET_STYLE/RESET_STYLE
(line) opcodes, which bypass the CSS parser
Expand Down
1 change: 1 addition & 0 deletions test/codepoints/codepoints.js.gold
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ and must leave the other alone.
bold normal bold
italic upright italic
both italic only both
reverse normal reverse
---
The deprecated SET_STYLE/RESET_STYLE
opcodes, which bypass the CSS parser
Expand Down
Loading