Example program for the Cidco MailStation Z80 computer

screen_init: Add a shortcut to init screen buffers, clear it, recursor

Previously if there was no text printed at startup, the cursor was
never drawn.

+19 -2
+1
lib/mailstation.h
··· 101 101 extern unsigned char putchar_sgr; 102 102 extern unsigned char putchar_quick; 103 103 extern unsigned char *font_addr; 104 + extern void screen_init(void); 104 105 extern void lcd_cas(unsigned char col); 105 106 extern void lcd_sleep(void); 106 107 extern void lcd_wake(void);
+17
lib/putchar.s
··· 53 53 54 54 .area _CODE 55 55 56 + ; void screen_init(void) 57 + ; quick initialization of the screen 58 + _screen_init:: 59 + push hl 60 + call _clear_screen_bufs 61 + call _clear_screen 62 + call _recursor 63 + ld hl, #0 64 + push hl 65 + push hl 66 + call _stamp_char 67 + pop hl 68 + pop hl 69 + pop hl 70 + ret 71 + 72 + 56 73 ; void lcd_cas(unsigned char col) 57 74 ; enable CAS, address the LCD column col (in h), and disable CAS 58 75 _lcd_cas::
+1 -2
main.c
··· 32 32 /* ignore first peekkey() if it returns power button */ 33 33 lastkey = KEY_POWER; 34 34 35 - clear_screen_bufs(); 36 - clear_screen(); 35 + screen_init(); 37 36 38 37 wifi_init(); 39 38