Fixed >> on char variables, < and > operators in function calls

This commit is contained in:
Curtis F Kaylor 2020-10-17 22:19:30 -04:00
parent 3773129162
commit 929fa2976c
4 changed files with 8 additions and 9 deletions

View File

@ -89,7 +89,7 @@ void pdrctv(void) {
void prolog(void) {
DEBUG("c02.prolog: Writing Assembly Prolog\n", 0)
asmlin(CPUOP,cputyp);
if (strlen(cputyp)) asmlin(CPUOP,cputyp);
setcmt("Program ");
addcmt(srcnam);
cmtlin();
@ -193,9 +193,8 @@ void pargs(int argc, char *argv[]) {
* Uses: cputype *
* Sets: cmos */
void chkcpu(void) {
if (strcmp(cputyp, "6502") == 0) cmos = FALSE;
else if (strcmp(cputyp, "65C02") == 0) cmos = TRUE;
else ERROR("Invalid CPU Type %s\n", cputyp, EXIT_FAILURE)
if (strcmp(cputyp, "65C02") == 0) cmos = TRUE;
else cmos = FALSE;
}

View File

@ -26,7 +26,7 @@
#define LOCPFX "." //Local Variable Prefix
#define CPUOP "PROCESSOR" //Target CPU Pseudo-Operator
#define CPUARG "6502" //Target CPU Operand
#define CPUARG "" //Target CPU Operand
#define ORGOP "ORG" //Origin Pseudo-Op
#define EQUOP "EQU" //Equate Pseudo-Op
#define BYTEOP "BYTE" //Define Byte Pseudo-Op

View File

@ -38,7 +38,7 @@ int isspc(void) {return isspace(nxtchr);}
int isszop(void) {return match('@');}
int isvpre(void) {return TF(isalph() || islpre());}
int isxfop(void) {return match('?');}
int isxpre(void) {return TF(isvpre() || match('-') || match('*'));}
int isxpre(void) {return TF(isvpre() || isbtop() || match('-') || match('*'));}
/* Process ASCII Character */
char prcchr(char c) {
@ -375,7 +375,7 @@ void poperr(char* name) {
/* Process Post Operator */
void prcpst(int isint, char* name, char *index, char indtyp, char ispntr) {
DEBUG("parse.prcpst: Processing post operation '%c'\n", oper)
DEBUG("parse.prcpst: Processing post operation '%c\n'", oper)
if (ispntr) ERROR("Post Operation on dereferenced pointer %s not supported\n", name, EXIT_FAILURE)
//sprintf(word,"(%s),Y", name); strcpy(name, word); }
char name1[VARLEN+3];
@ -429,8 +429,8 @@ void prcpst(int isint, char* name, char *index, char indtyp, char ispntr) {
else if (strcmp(name, "Y")==0) poperr(name); //Index Register Shift not Supported
else if (strcmp(name, "A")==0) asmlin("LSR", "");
else {
asmlin("LSR", name);
if (isint) asmlin("ROR", name1);
if (isint) {asmlin("LSR", name1); asmlin("ROR", name);}
else asmlin("LSR", name);
}
break;
default: