lib/haxor/consts.rb in haxor-0.2.0 vs lib/haxor/consts.rb in haxor-0.3.0

- old
+ new

@@ -1,9 +1,9 @@ module Haxor class Consts MAJOR = 0 - MINOR = 2 + MINOR = 3 PATCH = 0 GEM_VERSION = "#{MAJOR}.#{MINOR}.#{PATCH}" VERSION = (MAJOR << 16) | (MINOR << 8) | PATCH ROOT_PATH = __dir__ + '/../..' @@ -14,13 +14,16 @@ RESERVED_MEM = 2048 # 1024 for CPU, 1024 for IVT IVT_ADDR = 1024 # OpCode OPCODE_CMD_MASK = 0x0000_0000_0000_00ff - OPCODE_FLG_MASK = 0xffff_ffff_ffff_ff00 + OPCODE_FLG_MASK = 0xffff_ffff_ffff_ff00 # << 8 OPCODE_FLG_OFFSET = 8 - OPCODE_FLG_DA = 1 << OPCODE_FLG_OFFSET # dereference A operand - OPCODE_FLG_DB = 2 << OPCODE_FLG_OFFSET # dereference B operand + # 8 bits of flag - 1st operand + # 8 bits of flag - 2nd operand + + OPERAND_FLAGS = 8 # how many bits per operand + OPERAND_DEREFERENCE = (1 << 0) # Dereference operand (aka *operand) # Flags Registry Flags FR_ZERO = 1 << 0 # a-b == 0 FR_SIGN = 1 << 1 # a-b < 0 end