예제 #1
0
파일: CPUImpl.cs 프로젝트: Zino2201/Cosmos
 public override void AssembleNew(CPUAll.Assembler aAssembler, object aMethodInfo)
 {
     XS.ClearDirectionFlag();
     XS.Set(XSRegisters.EDI, XSRegisters.EBP, sourceDisplacement: 0xC); //address
     XS.Set(XSRegisters.ECX, XSRegisters.EBP, sourceDisplacement: 0x8); //length
     // set EAX to value of fill (zero)
     XS.Xor(XSRegisters.EAX, XSRegisters.EAX);
     XS.ShiftRight(XSRegisters.ECX, 1);
     XS.Jump(CPUx86.ConditionalTestEnum.NotBelow, ".step2");
     XS.StoreByteInString();
     XS.Label(".step2");
     XS.ShiftRight(XSRegisters.ECX, 1);
     XS.Jump(CPUx86.ConditionalTestEnum.NotBelow, ".step3");
     XS.StoreWordInString();
     XS.Label(".step3");
     new CPUx86.Stos { Size = 32, Prefixes = CPUx86.InstructionPrefixes.Repeat };
 }
예제 #2
0
파일: CPUImpl.cs 프로젝트: Zino2201/Cosmos
 public override void AssembleNew(CPUAll.Assembler aAssembler, object aMethodInfo)
 {
     XS.Push("_end_code");
 }