public override Constant GetRegister(RegisterStorage r) { Z80Register reg = r as Z80Register; if (reg != null && isValid[reg.FileSlot]) { return(Constant.Create(reg.DataType, registerFile[reg.FileSlot])); } else { return(Constant.Invalid); } }
public override void SetRegister(RegisterStorage r, Constant v) { Z80Register reg = r as Z80Register; if (reg != null && v != null && v.IsValid) { isValid[reg.FileSlot] = true; registerFile[reg.FileSlot] = v.ToByte(); } else { isValid[reg.FileSlot] = false; } }