From ae10c6bce0b8ff31486bce061198482867a4a5de Mon Sep 17 00:00:00 2001 From: Erick Date: Fri, 4 Feb 2022 12:35:29 +0100 Subject: [PATCH] minor corrections --- tyvm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tyvm.c b/tyvm.c index ec6dd19..a05fd36 100644 --- a/tyvm.c +++ b/tyvm.c @@ -67,7 +67,7 @@ enum opcodes { // [name, 8-bit value] OP_JMP, // jump, 1100 OP_RES, // reserved opcode, OP_LEA, // load effective address, 1110 - OP_TRAP, // execute trap, + OP_TRAP, // execute trap, 1111 }; /* Creating condition flags */ @@ -111,7 +111,9 @@ int main(int argc, const char* argv[]) { disable_input_buffering(); reg[RG_COND] = FL_Z; - reg[RG_PC] = 0x3000; //0x3000 is default load address + + enum {PC_START = 0x3000}; + reg[RG_PC] = PC_START; //0x3000 is default load address int running = TRUE; while(running) {