public void Mem_SetValue(Operand o, int value) { var i1 = GetAddress(o.Value); var c = Bit.Coder(value); for (var i = 0; i < c.Length; i++) { MRT.Cache.Cache.Content[i1 + i] = c[i]; } }
public void Push(Stream stream) { stream.push((byte)OperandType, (int)AsmDataType.TBits); switch (OperandType) { case OperandType.Reg: stream.push((byte)Value, (int)AsmDataType.RBits); break; case OperandType.Mem: stream.push(Bit.Coder(Value), (int)AsmDataType.DWord); break; case OperandType.imm: stream.push((byte)DataType, (int)AsmDataType.TBits); switch (DataType) { case DataType.Hex: stream.push((byte)Value, (int)AsmDataType.Hex); break; case DataType.Byte: stream.push((byte)Value, (int)AsmDataType.Byte); break; case DataType.Word: stream.push(Bit.Coder((Int16)Value), (int)AsmDataType.Word); break; case DataType.DWord: stream.push(Bit.Coder(Value), (int)AsmDataType.DWord); break; } break; } }