Updated the docs to include new jump operands and setup the assembler to handle parsing all the jump instructions.
This commit is contained in:
@@ -264,6 +264,58 @@ void HandleOpcode(void) {
|
||||
case POP:
|
||||
ExpectRegister();
|
||||
break;
|
||||
case JMP:
|
||||
{
|
||||
Token* arg = PeekToken();
|
||||
|
||||
if (arg->Class == IdentifierClass) {
|
||||
ExpectIdentifier(0, ForwardParser);
|
||||
|
||||
opcode->Value.Mnemonic = JMPA;
|
||||
opcode->Lemexe = "JMPA";
|
||||
}
|
||||
else ExpectRegister();
|
||||
}
|
||||
break;
|
||||
case JZ:
|
||||
{
|
||||
Token* arg = PeekToken();
|
||||
|
||||
if (arg->Class == IdentifierClass) {
|
||||
ExpectIdentifier(0, ForwardParser);
|
||||
|
||||
opcode->Value.Mnemonic = JZA;
|
||||
opcode->Lemexe = "JZA";
|
||||
}
|
||||
else ExpectRegister();
|
||||
}
|
||||
break;
|
||||
case JG:
|
||||
{
|
||||
Token* arg = PeekToken();
|
||||
|
||||
if (arg->Class == IdentifierClass) {
|
||||
ExpectIdentifier(0, ForwardParser);
|
||||
|
||||
opcode->Value.Mnemonic = JGA;
|
||||
opcode->Lemexe = "JGA";
|
||||
}
|
||||
else ExpectRegister();
|
||||
}
|
||||
break;
|
||||
case JL:
|
||||
{
|
||||
Token* arg = PeekToken();
|
||||
|
||||
if (arg->Class == IdentifierClass) {
|
||||
ExpectIdentifier(0, ForwardParser);
|
||||
|
||||
opcode->Value.Mnemonic = JLA;
|
||||
opcode->Lemexe = "JLA";
|
||||
}
|
||||
else ExpectRegister();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user