Skip to content

Commit d69cdbb

Browse files
committed
refact: optimize PRINT routine
1 parent ea28070 commit d69cdbb

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/arch/zx48k/library-asm/print.asm

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,10 @@ INVERSE_MODE: ; 00 -> NOP -> INVERSE 0
176176
ld (DFCC), hl
177177

178178
ld hl, (DFCCL) ; current ATTR Pos
179-
push hl
180-
call __SET_ATTR
181-
pop hl
182179
inc hl
183-
ld (DFCCL),hl
180+
ld (DFCCL), hl
181+
dec hl
182+
call __SET_ATTR
184183
exx
185184
ret
186185

src/arch/zxnext/library-asm/print.asm

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,10 @@ INVERSE_MODE: ; 00 -> NOP -> INVERSE 0
176176
ld (DFCC), hl
177177

178178
ld hl, (DFCCL) ; current ATTR Pos
179-
push hl
180-
call __SET_ATTR
181-
pop hl
182179
inc hl
183-
ld (DFCCL),hl
180+
ld (DFCCL), hl
181+
dec hl
182+
call __SET_ATTR
184183
exx
185184
ret
186185

0 commit comments

Comments
 (0)