Open amaneureka opened 8 years ago
Buffer can be more 4 MB or very much less than 4 MB so we have to take care of size before updating the main buffer.
//File: Atomix.Kernel_H.drivers.video.VBE.cs public static void Update() { #warning *4MB* is not good size //Copy 4MB of data from Secondary Buffer to Virtual Frame Buffer Core.AssemblerCode.Add(new Mov { DestinationReg = Registers.ESI, SourceRef = "static_Field__System_Byte__Atomix_Kernel_H_drivers_video_VBE_SecondaryBuffer", SourceIndirect = true }); Core.AssemblerCode.Add(new Mov { DestinationReg = Registers.EDI, SourceRef = "static_Field__System_Byte__Atomix_Kernel_H_drivers_video_VBE_VirtualFrameBuffer", SourceIndirect = true }); Core.AssemblerCode.Add(new Mov { DestinationReg = Registers.ECX, SourceRef = "0x100000" }); Core.AssemblerCode.Add(new Cli()); Core.AssemblerCode.Add(new Literal("rep movsd")); Core.AssemblerCode.Add(new Sti()); }
Paging.cs Function: AllocateMainBuffer and AllocateSecondayBuffer
AllocateMainBuffer
AllocateSecondayBuffer
Buffer can be more 4 MB or very much less than 4 MB so we have to take care of size before updating the main buffer.