2 ; unsigned char __fastcall__ textcolor (unsigned char color);
3 ; unsigned char __fastcall__ bgcolor (unsigned char color);
4 ; unsigned char __fastcall__ bordercolor (unsigned char color);
7 .export _textcolor, _bgcolor, _bordercolor
15 _bordercolor := return0 ; always black
18 ldx CHARCOLOR ; get old value
19 sta CHARCOLOR ; set new value
24 ldx BGCOLOR ; get old value
25 sta BGCOLOR ; set new value
42 colors: .word ((0<<6)+(0<<3)+(0)) ; $0 black
43 .word ((7<<6)+(7<<3)+(7)) ; $1 white
44 .word ((0<<6)+(7<<3)+(0)) ; $2 red
45 .word ((7<<6)+(0<<3)+(7)) ; $3 cyan
46 .word ((0<<6)+(5<<3)+(7)) ; $4 violet
47 .word ((7<<6)+(0<<3)+(0)) ; $5 green
48 .word ((0<<6)+(0<<3)+(7)) ; $6 blue
49 .word ((7<<6)+(7<<3)+(0)) ; $7 yellow
50 .word ((5<<6)+(7<<3)+(0)) ; $8 orange
51 .word ((3<<6)+(4<<3)+(3)) ; $9 brown
52 .word ((4<<6)+(7<<3)+(4)) ; $A light red
53 .word ((3<<6)+(3<<3)+(3)) ; $B dark grey
54 .word ((4<<6)+(4<<3)+(4)) ; $C middle grey
55 .word ((7<<6)+(4<<3)+(4)) ; $D light green
56 .word ((4<<6)+(4<<3)+(7)) ; $E light blue
57 .word ((6<<6)+(6<<3)+(6)) ; $F light gray
59 ;-------------------------------------------------------------------------------
60 ; force the init constructor to be imported
63 conio_init = initconio