Add call/ret/push/pop instructions
* Call/ret/push/pop are implemented and appear to be working * Call/ret/push/pop is specified in the 0x2000 block, replacing the mov instruction * Mov instruction is now specified in the 0x3000 block Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -95,6 +95,10 @@ Inst -> Inst:
|
||||
| 'JMP' Value { Inst::Jmp($2) }
|
||||
| 'JZ' Value { Inst::Jz($2) }
|
||||
| 'JNZ' Value { Inst::Jnz($2) }
|
||||
| 'CALL' Value { Inst::Call($2) }
|
||||
| 'RET' { Inst::Ret }
|
||||
| 'PUSH' Value { Inst::Push($2) }
|
||||
| 'POP' Value { Inst::Pop($2) }
|
||||
| 'MOV' Value 'COMMA' Value { Inst::Mov($2, $4) }
|
||||
| 'HALT' { Inst::Halt }
|
||||
| 'NOP' { Inst::Nop }
|
||||
|
||||
Reference in New Issue
Block a user