Cosmos/source/Indy.IL2CPU/Assembler/x86/RepeatStos.cs
mterwoord_cp 8b8be0c28d
2008-11-29 17:26:44 +00:00

29 lines
932 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Indy.IL2CPU.Assembler.X86 {
[OpCode("rep stos")]
public class RepeatStos: InstructionWithSize {
public static void InitializeEncodingData(Instruction.InstructionData aData) {
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
OpCode = new byte[] { 0xF3, 0xAA },
OperandSizeByte=1,
DefaultSize=InstructionSize.Word
});
}
public override string ToString() {
switch(Size) {
case 32:
return "rep stosd";
case 16:
return "rep stosw";
case 8:
return "rep stosb";
default:throw new Exception("Size not supported!");
}
}
}
}