~intarga/i8080e

7b680a1fc1979b1d09f9fa81c664c323f4ad8908 — Ingrid 2 years ago a8ee04b
declare register names with enum instead of #define
1 files changed, 12 insertions(+), 10 deletions(-)

M src/cpu.h
M src/cpu.h => src/cpu.h +12 -10
@@ 7,16 7,18 @@

// -- Register names --

#define A 0 // accumulator
#define B 1
#define C 2
#define D 3
#define E 4
#define H 5
#define L 6
#define SP 7 // stack pointer
#define M 8 // memory reference
#define PSW 9
enum Register {
    A, // accumulator
    B,
    C,
    D,
    E,
    H,
    L,
    SP, // stack pointer
    M, // memory reference
    PSW,
};

// -- System state --