From ed6e3b67c2de520e159819f4ad0ba64650bd1470 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 31 Mar 2026 07:56:00 -0400 Subject: Started rewriting bits of edbox.c in asm. Now 5219 bytes free. --- src/edbox.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'src/edbox.c') diff --git a/src/edbox.c b/src/edbox.c index ff61359..126762a 100644 --- a/src/edbox.c +++ b/src/edbox.c @@ -13,25 +13,19 @@ static char old_len; static char typeover; char edbox_visible = 0; -static char edbox_pos; /* range 0 to EDBOX_SIZE - 1 */ +char edbox_pos; /* range 0 to EDBOX_SIZE - 1 */ char edbox_len; /* idem */ void (*edbox_callback)(void); -static void hide_cursor(void) { +void hide_cursor(void) { edit_box[edbox_pos] &= 0x7f; } -static void show_cursor(void) { +void show_cursor(void) { edit_box[edbox_pos] |= 0x80; } -void edbox_clear(void) { - bzero(edit_box, EDBOX_SIZE + 1); - edbox_pos = edbox_len = 0; - show_cursor(); // not needed? seems it is.. -} - void edbox_show(void) { u16 addr; @@ -291,6 +285,14 @@ void edbox_keystroke(char c) { if(edbox_visible) edbox_show(); } +/* see edboxutl.s for the asm rewrites of these */ +#if 0 +void edbox_clear(void) { + bzero(edit_box, EDBOX_SIZE + 1); + edbox_pos = edbox_len = 0; + show_cursor(); // not needed? seems it is.. +} + void edbox_addchr(char c) { edit_box[edbox_len++] = c; edbox_pos = edbox_len; @@ -307,3 +309,4 @@ void edbox_set(char *contents) { } edbox_pos = edbox_len; } +#endif -- cgit v1.2.3