mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-27 05:52:11 +00:00
- Structs defining PDT and PT entries
- Methods for enabling and disabling Paging and PSE (PSE untested)
- Method for setting the contents of CR3 (which points to the PDT)
19 lines
No EOL
611 B
C#
19 lines
No EOL
611 B
C#
using System;
|
|
|
|
using Indy.IL2CPU.Plugs;
|
|
using Indy.IL2CPU.Assembler;
|
|
using Indy.IL2CPU.Assembler.X86;
|
|
using Assembler=Indy.IL2CPU.Assembler.Assembler;
|
|
|
|
namespace Cosmos.Kernel.Plugs.Assemblers
|
|
{
|
|
public class ASMDisablePaging : AssemblerMethod
|
|
{
|
|
public override void Assemble(Assembler aAssembler)
|
|
{
|
|
new Move { DestinationReg = Registers.EAX, SourceReg = Registers.CR0 };
|
|
new And { DestinationReg = Registers.EAX, SourceValue = 0x7FFFFFFF };
|
|
new Move { DestinationReg = Registers.CR0, SourceReg = Registers.EAX };
|
|
}
|
|
}
|
|
} |