Skip to content

Commit cb7e894

Browse files
committed
Make PLOT to use the SET_PIXEL_ADDR_ATTR routine
This routine is not in ROM, and is centralised by all drawing and printing primitives.
1 parent 5664ed8 commit cb7e894

1 file changed

Lines changed: 2 additions & 15 deletions

File tree

library-asm/plot.asm

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include once <error.asm>
88
#include once <in_screen.asm>
99
#include once <cls.asm>
10+
#include once <attr.asm>
1011

1112
PLOT:
1213
PROC
@@ -64,21 +65,7 @@ __PLOT_OVER1:
6465
LOCAL __PLOT_END
6566
__PLOT_END:
6667
ld (hl), a
67-
68-
;; gets ATTR position with offset given in SCREEN_ADDR
69-
ld a, h
70-
rrca
71-
rrca
72-
rrca
73-
and 3
74-
or 18h
75-
ld h, a
76-
ld de, (SCREEN_ADDR)
77-
add hl, de ;; Final screen addr
78-
79-
LOCAL PO_ATTR_2
80-
PO_ATTR_2 EQU 0BE4h ; Another entry to PO_ATTR
81-
jp PO_ATTR_2 ; This will update attr accordingly. Beware, uses IY
68+
jp SET_PIXEL_ADDR_ATTR
8269

8370
__PLOT_ERR:
8471
jp __OUT_OF_SCREEN_ERR ; Spent 3 bytes, but saves 3 T-States at (#1)

0 commit comments

Comments
 (0)