1
0
Fork 0
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:
Henrik Hautakoski 2018-10-28 14:22:31 +01:00
parent dca453457d
commit 837bd8f892
No known key found for this signature in database
GPG key ID: 839F3A7EAFAEAFAA
2 changed files with 2 additions and 5 deletions

View file

@ -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

View file

@ -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 {