1
0
mirror of https://github.com/RevCurtisP/C02.git synced 2024-09-28 20:56:53 +00:00

Moved ACMNT macro call to inside getwrd()

This commit is contained in:
Curtis F Kaylor 2018-02-26 22:31:17 -05:00
parent 6bc29d42a6
commit 709f465860
6 changed files with 5 additions and 8 deletions

2
c02.c
View File

@ -52,7 +52,6 @@ void pword()
{
lsrtrn = FALSE; //Clear RETURN flag
getwrd();
ACMNT(word);
DEBUG("Parsing Word '%s'\n", word);
if (xstmnt[0]) {
if (wordis(xstmnt))
@ -68,6 +67,7 @@ void pword()
void pdrctv()
{
skpchr(); //skip '#'
CCMNT('#');
getwrd(); //read directive into word
DEBUG("Processing directive '%s'\n", word);
if (wordis("DEFINE"))

View File

@ -20,7 +20,6 @@
/* Add Function Definition */
void addfnc()
{
ACMNT(word);
expect('(');
strcpy(fncnam, word); //Save Function Name
prmcnt = 0; //Set Number of Parameters

View File

@ -67,6 +67,7 @@ void pdefin()
setlbl(word); //Set label Assembler Line
expect('=');
defval[defcnt++] = prsbyt(); //Get Value
ACMNT(word); //comment value
asmlin(EQUOP, value); //Write Definition
DEBUG("Defined as '%s'\n", value);
}

View File

@ -145,6 +145,7 @@ void getwrd()
word[wrdlen++] = toupper(getnxt());
}
word[wrdlen] = 0;
ACMNT(word);
}
/* Escape Character */
@ -194,7 +195,7 @@ int prsbin()
int digit;
int number = 0;
if (!match('%'))
expctd("hexadecimal number");
expctd("binary number");
word[wrdlen++] = nxtchr;
getnxt();
while (isbin()) {
@ -281,6 +282,7 @@ int prschr()
/* Parse numeric value *
* Args: maxval - maximum allowed value *
* Sets: value - parsed number (as string) *
* word - parses text of value *
* Returns: parsed number */
int prsnum(int maxval)
{
@ -360,7 +362,6 @@ void prscon()
else
cnstnt = prsbyt();
valtyp = CONSTANT;
ACMNT(word);
strcpy(word, value); //Patch for DASM
strcpy(value, "#");
strcat(value, word);

View File

@ -145,7 +145,6 @@ void pasm()
void prsasn(char trmntr)
{
getwrd(); //Get Variable to be Assigned
ACMNT(word);
prcvar(trmntr);
}
@ -177,7 +176,6 @@ void pdo()
void pdowhl() {
DEBUG("Parsing WHILE after DO '%c'\n", nxtchr);
getwrd(); //Check for While
ACMNT(word);
if (!wordis("WHILE"))
expctd("while statement");
expect('(');
@ -239,7 +237,6 @@ void pelse() {
void pgoto() {
DEBUG("Parsing GOTO statement\n", 0);
getwrd();
ACMNT(word);
expect(';');
asmlin("JMP", word);
}

1
vars.c
View File

@ -54,7 +54,6 @@ void prsvar(int alwreg)
if (valtyp != FUNCTION) chksym(alwreg, word);
strcpy(value, word);
DEBUG("Parsed variable '%s'\n", value);
ACMNT(word);
}
/* Require and Parse Variable Name *