From 2a0f6c420b37c0ae6d14f8a6b91e95fc67682b74 Mon Sep 17 00:00:00 2001 From: mrdudz Date: Mon, 12 Oct 2015 15:18:36 +0200 Subject: [PATCH] moved bordercolor function into a seperate file --- libsrc/c64/extra/soft80.s | 4 +++- libsrc/c64/soft80_bordercolor.s | 17 +++++++++++++++++ libsrc/c64/soft80_color.s | 9 +-------- 3 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 libsrc/c64/soft80_bordercolor.s diff --git a/libsrc/c64/extra/soft80.s b/libsrc/c64/extra/soft80.s index d43443fc8..162abb132 100644 --- a/libsrc/c64/extra/soft80.s +++ b/libsrc/c64/extra/soft80.s @@ -17,9 +17,11 @@ ; soft80_color.s .import soft80_textcolor .import soft80_bgcolor - .import soft80_bordercolor .export _textcolor := soft80_textcolor .export _bgcolor := soft80_bgcolor + + ; soft80_bordercolor.s + .import soft80_bordercolor .export _bordercolor := soft80_bordercolor ; soft80_cputc.s diff --git a/libsrc/c64/soft80_bordercolor.s b/libsrc/c64/soft80_bordercolor.s new file mode 100644 index 000000000..057cc410a --- /dev/null +++ b/libsrc/c64/soft80_bordercolor.s @@ -0,0 +1,17 @@ +; +; Groepaz/Hitmen, 12.10.2015 +; +; unsigned char __fastcall__ bordercolor (unsigned char color); +; + + .export soft80_bordercolor + + .include "c64.inc" + + ; FIXME: if we'd move this function into a seperate file in the regular + ; conio lib, then we dont need this override at all. +soft80_bordercolor: + ldx VIC_BORDERCOLOR ; get old value + sta VIC_BORDERCOLOR ; set new value + txa + rts diff --git a/libsrc/c64/soft80_color.s b/libsrc/c64/soft80_color.s index 51a19f26e..2d856508c 100644 --- a/libsrc/c64/soft80_color.s +++ b/libsrc/c64/soft80_color.s @@ -3,10 +3,9 @@ ; ; unsigned char __fastcall__ textcolor (unsigned char color); ; unsigned char __fastcall__ bgcolor (unsigned char color); -; unsigned char __fastcall__ bordercolor (unsigned char color); ; - .export soft80_textcolor, soft80_bgcolor, soft80_bordercolor + .export soft80_textcolor, soft80_bgcolor .import soft80_internal_textcolor, soft80_internal_bgcolor .importzp tmp1, tmp2 @@ -96,12 +95,6 @@ mkcharcolor: sta CHARCOLOR ; text/bg combo for new chars rts -soft80_bordercolor: - ldx VIC_BORDERCOLOR ; get old value - sta VIC_BORDERCOLOR ; set new value - txa - rts - ;------------------------------------------------------------------------------- ; force the init constructor to be imported -- 2.39.5