Corrected Minor defect of ignoring single digit immediates in assembler

This commit is contained in:
Jeremiah Orians 2016-06-06 21:47:54 -04:00
parent 89b42ef066
commit 67c0cda3d0
No known key found for this signature in database
GPG Key ID: 7457821534D2ACCD
1 changed files with 2 additions and 2 deletions

4
asm.c
View File

@ -99,7 +99,7 @@ Restart:
} }
else if((!(p->type & comment)) && ((32 == c) || (9 == c))) else if((!(p->type & comment)) && ((32 == c) || (9 == c)))
{ {
if(2 > i) if(1 > i)
{ {
goto Restart; goto Restart;
} }
@ -257,7 +257,7 @@ void assemble(struct Token* p)
setExpression(p, "ADDI", "0E", 4); setExpression(p, "ADDI", "0E", 4);
setExpression(p, "ADDUI", "0F", 4); setExpression(p, "ADDUI", "0F", 4);
setExpression(p, "SUBI", "10", 4); setExpression(p, "SUBI", "10", 4);
setExpression(p, "SUBI", "11", 4); setExpression(p, "SUBUI", "11", 4);
setExpression(p, "CMPI", "12", 4); setExpression(p, "CMPI", "12", 4);
setExpression(p, "LOAD", "13", 4); setExpression(p, "LOAD", "13", 4);
setExpression(p, "LOAD8", "14", 4); setExpression(p, "LOAD8", "14", 4);