Terminal program for MailStation devices

Cleanup some variable locations/segments, don't use BSS

+12 -18
-4
crt0.s
··· 136 136 137 137 _msTERM_version:: 138 138 .db #VERSION 139 - 140 - ; variables 141 - .area _BSS 142 - 143 139 _debug0:: 144 140 .db #0 145 141 _debug1::
-3
csi.c
··· 28 28 29 29 unsigned char in_csi; 30 30 31 - volatile unsigned char saved_cursorx; 32 - volatile unsigned char saved_cursory; 33 - 34 31 void 35 32 parseCSI(void) 36 33 {
-2
getchar.s
··· 30 30 ; the scancode pressed and the state of the shift and caps lock keys. 31 31 .include "scancodes.inc" 32 32 33 - .area _BSS 34 - 35 33 keyboardbuffer: 36 34 .ds 2 ; scancode buffer for _getchar 37 35 capslock:
+6 -6
mailstation.h
··· 110 110 111 111 112 112 /* csi.c */ 113 - extern volatile unsigned char saved_cursorx; 114 - extern volatile unsigned char saved_cursory; 113 + extern unsigned char saved_cursorx; 114 + extern unsigned char saved_cursory; 115 115 extern void parseCSI(void); 116 116 extern unsigned char in_csi; 117 117 extern unsigned char csibuf[TEXT_COLS]; ··· 119 119 120 120 121 121 /* putchar.s */ 122 - extern volatile unsigned char cursorx; 123 - extern volatile unsigned char cursory; 124 - extern volatile unsigned char putchar_sgr; 125 - extern volatile unsigned char putchar_quick; 122 + extern unsigned char cursorx; 123 + extern unsigned char cursory; 124 + extern unsigned char putchar_sgr; 125 + extern unsigned char putchar_quick; 126 126 extern unsigned char *font_addr; 127 127 extern void lcd_cas(unsigned char col); 128 128 extern void lcd_sleep(void);
+1 -1
modem.s
··· 24 24 .include "mailstation.inc" 25 25 .globl _new_mail 26 26 27 - .area _BSS 27 + .area _DATA 28 28 29 29 ; modem msr 30 30 _modem_curmsr::
+4 -2
putchar.s
··· 44 44 cursorx_lookup_data:: 45 45 .include "cursorx_lookup.inc" 46 46 47 - .area _BSS 48 - 49 47 _cursorx:: ; cursor x position, 0-indexed 50 48 .db #0 51 49 _cursory:: ; cursor y position, 0-indexed 50 + .db #0 51 + _saved_cursorx:: ; cursor x position, 0-indexed 52 + .db #0 53 + _saved_cursory:: ; cursor y position, 0-indexed 52 54 .db #0 53 55 _putchar_sgr:: ; current SGR for putchar() 54 56 .db #0
+1
settings.s
··· 31 31 .equ settings_ident_2, 's' 32 32 33 33 .area _DATA 34 + 34 35 settings_begin: 35 36 settings_ident: 36 37 .db #settings_ident_0