Skip to content

Commit

Permalink
fix: ASMC value cannot be larger than 255
Browse files Browse the repository at this point in the history
  • Loading branch information
lightbulb12294 committed Nov 11, 2020
1 parent 3b34ccc commit 6cc0d63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions AssemblyCompiler/ASMC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ struct ASM
{
sscanf(t2[i], "%d", &tmp);
op[i] = Operand(tmp, Data::VAL);
if(tmp >= 256 || tmp < 0) inst = Inst::INVALID;
if(tmp < 0) inst = Inst::INVALID;
}
}
}
Expand Down Expand Up @@ -243,4 +243,4 @@ int main(int argc, char **argv)
if(C != -1) printf("x, y, z = %d, %d, %d\nTotal cycle = %d\n", x, y, z, C);
else puts("CE instruction found.");
return 0;
}
}

0 comments on commit 6cc0d63

Please sign in to comment.