color.s (803B)
1 .include "global.s" 2 3 ;; Data 4 .area _INITIALIZED 5__current_1bpp_colors:: 6 ;; Foreground drawing colour 7.fg_colour:: 8 .ds 1 9 ;; Background drawing colour 10.bg_colour:: 11 .ds 1 12 ;; Drawing mode (.SOILD etc) 13.draw_mode:: 14 .ds 1 15 16 .area _INITIALIZER 17 18 .db 0x03 ; .fg_colour 19 .db 0x00 ; .bg_color 20 .db 0x00 ; .draw_mode 21 22 .area _HOME 23_set_1bpp_colors_ex:: 24_color:: 25 LDA HL,2(SP) ; Skip return address and registers 26 LD A,(HL+) ; A = Foreground 27 LD (.fg_colour),a 28 LD A,(HL+) 29 LD (.bg_colour),a 30 LD A,(HL) 31 LD (.draw_mode),a 32 RET