bond/x86/KeGraph32.c
HyperAssembler 7cc18fac3d So I figured that grub2 can do some fancy stuff about loading modules.
There we go! We will keep x86 and load x64 as a module and then jump to x64 from x86!!
2015-01-29 22:42:30 -08:00

30 lines
688 B
C

#include "KeGraph32.h"
#include "KeDef.h"
#include "KeGlobalVariables.h"
#include "KeKernelStruct32.h"
ULONG32 KeGetCurrentGraphRow( _IN_ ULONG32 GraphPosition)
{
return (GraphPosition/2*DOSGraphColumn);
}
ULONG32 KeCheckGraphRowForPrint(_IN_ ULONG32 GraphPosition)
{
if(GraphPosition>=DOSGraphMaxBytes)
{
GraphPosition = _asm_KeGraphRowOverflow(GraphPosition);
}
return GraphPosition;
}
ULONG32 KeCheckGraphRowForReturn(_IN_ ULONG32 GraphPosition)
{
ULONG32 GraphRow = GraphPosition/(2*DOSGraphColumn);
if(GraphRow >= (DOSGraphRow-1))
{
GraphPosition = _asm_KeGraphRowOverflow(GraphPosition);
GraphPosition = _asm_KeSetGraphPosition32(23,0);
}
return GraphPosition;
}