From 5b434febe8f2dc2a2ef896a95412348aaca02539 Mon Sep 17 00:00:00 2001 From: Erick Date: Fri, 28 Jan 2022 11:48:57 +0100 Subject: [PATCH] initialized flag and program counter registers --- MAKEFILE | 3 ++- tyvm.c | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/MAKEFILE b/MAKEFILE index 662402b..a0eb1cf 100644 --- a/MAKEFILE +++ b/MAKEFILE @@ -1,4 +1,3 @@ - TARGET ?= a.out SRC_DIRS ?= ./src @@ -19,3 +18,5 @@ clean: $(RM) $(TARGET) $(OBJS) $(DEPS) -include $(DEPS) + +# if "make" does not work on shell, try "make -d" \ No newline at end of file diff --git a/tyvm.c b/tyvm.c index dcb70cd..2826322 100644 --- a/tyvm.c +++ b/tyvm.c @@ -54,8 +54,17 @@ enum flags { FL_NEG = 1 << 2, // N }; + int main(int argc, const char* argv[]) { + enum registers RG; + enum opcodes OP; + + reg[RG_COND] = FL_ZRO; + reg[RG_PC] = 0x3000; //0x3000 is default + + + }