; hence core lib

.define_eval NULL,  0
.define_eval VOID,  NULL

.define_eval FALSE, NULL
.define_eval TRUE,  1

.define_eval CORE_U8_MAX,   0x00ff
.define_eval CORE_U16_MAX,  0xffff

.define_eval CORE_KB, 1024

.define_eval CORE_MEM_PRG,      (0 * CORE_KB)
.define_eval CORE_MEM_PRG_END,  (32 * CORE_KB)
.define_eval CORE_MEM_ST,       CORE_MEM_PRG_END
.define_eval CORE_MEM_MEM,      (40 * CORE_KB)
.define_eval CORE_MEM_OUT,      (48 * CORE_KB)
.define_eval CORE_MEM_CHR,      (CORE_MEM_OUT + 1)
.define_eval CORE_MEM_KEY,      (CORE_MEM_CHR + 2)

.define_eval CORE_REG_PC,   0x0
.define_eval CORE_REG_OPC,  0x1
.define_eval CORE_REG_ARG,  0x2
.define_eval CORE_REG_S,    0x3
.define_eval CORE_REG_SP,   0x4
.define_eval CORE_REG_A,    0x5
.define_eval CORE_REG_B,    0x6
.define_eval CORE_REG_C,    0x7
.define_eval CORE_REG_D,    0x8

.define_eval CORE_ALU_NOT,  0x00
.define_eval CORE_ALU_AND,  0x01
.define_eval CORE_ALU_OR,   0x02
.define_eval CORE_ALU_XOR,  0x03
.define_eval CORE_ALU_LSH,  0x04
.define_eval CORE_ALU_RSH,  0x05
.define_eval CORE_ALU_ADD,  0x06
.define_eval CORE_ALU_SUB,  0x07
.define_eval CORE_ALU_MUL,  0x08
.define_eval CORE_ALU_DIV,  0x09
.define_eval CORE_ALU_CMP,  0x0a
.define_eval CORE_ALU_EQ,   0x0b
.define_eval CORE_ALU_LT,   0x0c
.define_eval CORE_ALU_GT,   0x0d
.define_eval CORE_ALU_LEQ,  0x0e
.define_eval CORE_ALU_GEQ,  0x0f
.define_eval CORE_ALU_BOL,  0x10
.define_eval CORE_ALU_INV,  0x11
.define_eval CORE_ALU_RND,  0x12
.define_eval CORE_ALU_TME,  0x13
