mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-27 22:12:25 +00:00
24 lines
747 B
C#
24 lines
747 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace Indy.IL2CPU.Assembler.X86.X {
|
|
public class AddressIndirect : Address {
|
|
protected Register32 mBaseRegister;
|
|
protected UInt32 mDisplacement = 0;
|
|
|
|
public AddressIndirect(Register32 aBaseRegister, UInt32 aDisplacement) {
|
|
mBaseRegister = aBaseRegister;
|
|
mDisplacement = aDisplacement;
|
|
}
|
|
|
|
public override string ToString() {
|
|
if (mDisplacement == 0) {
|
|
return "[" + mBaseRegister.ToString() + "]";
|
|
} else {
|
|
return "[" + mBaseRegister.ToString() + " + " + mDisplacement + "]";
|
|
}
|
|
}
|
|
}
|
|
}
|