summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/vcpu.c2
-rw-r--r--src/vcpu.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/vcpu.c b/src/vcpu.c
index 4ca5cc1..45b9aca 100644
--- a/src/vcpu.c
+++ b/src/vcpu.c
@@ -57,7 +57,7 @@ void VCPUExecute(){
case 0xD:
int X=State.V[State.X]%63;
int Y=State.V[State.Y]%31;
- State.V[0xF]=0; // Set flag to 0
+ State.V[REG_FLAG]=0; // Set flag to 0
for(char row=0;row<State.N;row++){
}
diff --git a/src/vcpu.h b/src/vcpu.h
index 33a1492..bd4d2d5 100644
--- a/src/vcpu.h
+++ b/src/vcpu.h
@@ -1,5 +1,7 @@
#pragma once
+#define REG_FLAG 0xF
+
typedef struct VCPU_State {
// Program Counter (16 bits but only 12 bits used (4096 memory addresses))
unsigned short PC;