mirror of
https://github.com/RevCurtisP/C02.git
synced 2025-04-21 09:38:12 +00:00
Break long data statements into multiple lines
This commit is contained in:
parent
e26c49d790
commit
b6b84aaa9b
@ -142,7 +142,7 @@ char escape(char c) {
|
||||
switch (c) {
|
||||
case 'a': return 0x07; //Alert (Beep/Bell)
|
||||
case 'b': return 0x08; //Backspace
|
||||
case 'e': return 0x08; //Escape
|
||||
case 'e': return 0x1B; //Escape
|
||||
case 'f': return 0x0C; //Form Feed
|
||||
case 'n': return 0x0A; //Newline (Line Feed)
|
||||
case 'r': return 0x0D; //Return (Carriage Return)
|
||||
|
12
src/vars.c
12
src/vars.c
@ -287,14 +287,18 @@ void vardef(int m) {
|
||||
DEBUG("Building Data for Variable '%s'\n", varnam[i])
|
||||
value[0] = 0;
|
||||
for (j=0; j<datlen[i]; j++) {
|
||||
if (j) strcat(value,",");
|
||||
if (strlen(value)) strcat(value,",");
|
||||
sprintf(word, "$%hhX", datvar[dlen++]);
|
||||
strcat(value, word);
|
||||
strcat(value, word);
|
||||
if (strlen(value)>64) {asmlin(BYTEOP,value); value[0]=0;}
|
||||
}
|
||||
if (dattyp[i] == DTSTR) {
|
||||
if (strlen(value)) strcat(value,",");
|
||||
strcat(value, "$00");
|
||||
}
|
||||
if (dattyp[i] == DTSTR) strcat(value, ",$00");
|
||||
DEBUG("Allocating Data for Variable '%s'\n", varnam[i])
|
||||
asmlin(BYTEOP, value);
|
||||
}
|
||||
}
|
||||
else if (strlen(varsiz[i]) > 0) {
|
||||
DEBUG("Allocating array '%s'\n", varnam[i])
|
||||
asmlin(STROP, varsiz[i]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user