2 ; Ullrich von Bassewitz, 13.09.2001
5 .export _textcolor, _bgcolor, _bordercolor
6 .import sys_bank, restore_bank
7 .import vic: zp, CHARCOLOR: zp
12 ; ------------------------------------------------------------------------
13 ; unsigned char __fastcall__ textcolor (unsigned char color);
14 ; /* Set the color for text output. The old color setting is returned. */
19 ldx CHARCOLOR ; get old value
20 sta CHARCOLOR ; set new value
26 ; ------------------------------------------------------------------------
27 ; unsigned char __fastcall__ bgcolor (unsigned char color);
28 ; /* Set the color for the background. The old color setting is returned. */
33 jsr sys_bank ; Switch to the system bank
36 lda (vic),y ; Get current color...
39 sta (vic),y ; Set new color
40 txa ; Get old color into X
41 jmp restore_bank ; Restore the old color
45 ; ------------------------------------------------------------------------
46 ; unsigned char __fastcall__ bordercolor (unsigned char color);
47 ; /* Set the color for the border. The old color setting is returned. */
51 jsr sys_bank ; Switch to the system bank
54 lda (vic),y ; Get current color...
57 sta (vic),y ; Set new color
58 txa ; Get old color into X
59 jmp restore_bank ; Restore the old color