mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-27 05:52:11 +00:00
15 lines
No EOL
632 B
C#
15 lines
No EOL
632 B
C#
using System;
|
|
|
|
using Cosmos.IL2CPU.Plugs;
|
|
using CPUx86 = Cosmos.Compiler.Assembler.X86;
|
|
using Assembler = Cosmos.Compiler.Assembler.Assembler;
|
|
|
|
namespace Cosmos.Kernel.Plugs.Assemblers {
|
|
public class ASMDisablePaging: AssemblerMethod {
|
|
public override void AssembleNew(object aAssembler, object aMethodInfo) {
|
|
new CPUx86.Move { DestinationReg = CPUx86.Registers.EAX, SourceReg = CPUx86.Registers.CR0 };
|
|
new CPUx86.And { DestinationReg = CPUx86.Registers.EAX, SourceValue = 0x7FFFFFFF };
|
|
new CPUx86.Move { DestinationReg = CPUx86.Registers.CR0, SourceReg = CPUx86.Registers.EAX };
|
|
}
|
|
}
|
|
} |