From 837bd8f892de2c8b88faba472ed6d3863b0951e9 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sun, 28 Oct 2018 14:22:31 +0100 Subject: [PATCH] src/instr: remove OP_SYSC_WR,OP_SYSC_RD in favor for OP_INT. --- src/instr.c | 2 +- src/instr.h | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/instr.c b/src/instr.c index 9e5636b..ff0e4ee 100644 --- a/src/instr.c +++ b/src/instr.c @@ -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 diff --git a/src/instr.h b/src/instr.h index 070fc51..857afb1 100644 --- a/src/instr.h +++ b/src/instr.h @@ -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 {