Cosmos/source/Indy.IL2CPU/Assembler/x86/JumpBase.cs
mterwoord_cp f843b15a6c
2008-12-01 06:42:14 +00:00

32 lines
No EOL
1 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Indy.IL2CPU.Assembler.X86 {
public abstract class JumpBase: InstructionWithDestination {
public string DestinationLabel {
get {
if (DestinationRef != null) {
return DestinationRef.Name;
}
return String.Empty;
}
set {
DestinationRef = new ElementReference(value);
}
}
protected bool mNear = true;
public override string ToString() {
var xResult = base.ToString();
if (mNear) {
if (!xResult.StartsWith(Mnemonic + " near", StringComparison.InvariantCultureIgnoreCase)) {
if (xResult.StartsWith(Mnemonic)) {
return Mnemonic + " near " + xResult.Substring(Mnemonic.Length + 1);
}
}
}
return xResult;
}
}
}