private void set(int addr, int val) { if (memory != null) memory.setByte(addr, val); }
private int get(int addr) { if (memory == null) return 0; return memory.getByte(addr); }