mirror of
https://github.com/pnx/m16vm
synced 2026-06-16 03:44:55 +02:00
src/instr: remove OP_SYSC_WR,OP_SYSC_RD in favor for OP_INT.
This commit is contained in:
parent
dca453457d
commit
837bd8f892
2 changed files with 2 additions and 5 deletions
|
|
@ -40,7 +40,7 @@ void instr_decode(unsigned char *instr, struct instr *out) {
|
|||
out->r.rs = *instr & 0xF;
|
||||
|
||||
// I-Type
|
||||
if (out->opcode == OP_MOVL || out->opcode == OP_MOVH || out->opcode == OP_SYSC_WR) {
|
||||
if (out->opcode == OP_MOVL || out->opcode == OP_MOVH || out->opcode == OP_INT) {
|
||||
out->i.imm = *(instr + 1);
|
||||
}
|
||||
// R/RI-Type
|
||||
|
|
|
|||
|
|
@ -32,10 +32,7 @@
|
|||
#define OP_BEQ 6
|
||||
#define OP_JMP 7
|
||||
#define OP_JR 8
|
||||
|
||||
/* System calls */
|
||||
#define OP_SYSC_RD 14 /* read char from stdin */
|
||||
#define OP_SYSC_WR 15 /* write char to stdout */
|
||||
#define OP_INT 15
|
||||
|
||||
/* Register type */
|
||||
struct instr_R {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue