S
Spike
Hi I'm using GCC (and NASM) to send over a asm table...
BootDrv db 0
BIOS_Mem_Map_Entries dd 0
APM_Status db 0
APM_Major_Version db 0
APM_Minor_Version db 0
APM_Code_Base dd 0
APM_Data_Base dd 0
APM_Data_Length dd 0
APM_Code_Length dd 0
VESA_Struct_Start:
;VESA
VESASignature db 'VESA'
VESAVersion dw 0
OemStringPtr dd 0
Capabilities dd 0
VideoModePtr dd 0
TotalMemory dw 0
;VBE2
OemSoftwareRev dw 0
OemVendorNamePtr dd 0
OemProductNamePtr dd 0
OemProductRevPtr dd 0
VBE2_reserved times 222 db 0
VBE_OemData times 256 db 0
VESA_ModeInfo dd 0
VESA_Mode_Counter dw 0
VGA_Mode_Counter dw 0
VGA_ModeInfo dd 0
Graphics_Mode_Choosen db 1
Graphics_SubMode_Choosen db 0
TimerLoop dd 0
Current_X dw 0
Current_Y dw 0
....to a C struc...
typedef struct BIOSInfo
{
BYTE BootDrv;
ULONG BIOS_Mem_Entries;
BYTE APM_Status;
BYTE APM_Major_Version;
BYTE APM_Minor_Version;
ULONG APM_Code_Base;
ULONG APM_Data_Base;
ULONG APM_Data_Length;
ULONG APM_Code_Length;
//VESA Struct Start
BYTE VESA_Signature[4];
USHORT VESAVersion;
ULONG OemStringPtr;
ULONG Capabilities;
ULONG VideoModePtr;
USHORT TotalMemory;
//VBE2 tillägg
USHORT OemSoftwareRev;
ULONG OemVendorNamePtr;
ULONG OemProductNamePtr;
ULONG OemProductRevPtr;
BYTE VBE2_reserved[222];
BYTE VBE_OemData[256];
ULONG VESA_ModeInfo;
USHORT VESA_Mode_Counter;
USHORT VGA_Mode_Counter;
ULONG VGA_ModeInfo;
BYTE Graphics_Mode_Choosen;
BYTE Graphics_SubMode_Choosen;
ULONG TimerLoop;
USHORT Current_X;
USHORT Current_Y;
}BIOSInfo;
.... but for some reason:
BIOSInfo *BIOS_Info_Pointer = Get_ASM_Params();
ScreenMode[0] = BIOS_Info_Pointer->Graphics_Mode_Choosen;
ScreenMode[1] = BIOS_Info_Pointer->Graphics_SubMode_Choosen;
ScreenMode[0] isn't equal to 1 (Graphics_Mode_Choosen) and ScreenMode[1]
isn't equal to 0 (Graphics_SubMode_Choosen).
Can anybody give me a hint on what's wrong?
btw:
_Get_ASM_Params:
lea eax,[BootDrv]
ret
TIA!
BootDrv db 0
BIOS_Mem_Map_Entries dd 0
APM_Status db 0
APM_Major_Version db 0
APM_Minor_Version db 0
APM_Code_Base dd 0
APM_Data_Base dd 0
APM_Data_Length dd 0
APM_Code_Length dd 0
VESA_Struct_Start:
;VESA
VESASignature db 'VESA'
VESAVersion dw 0
OemStringPtr dd 0
Capabilities dd 0
VideoModePtr dd 0
TotalMemory dw 0
;VBE2
OemSoftwareRev dw 0
OemVendorNamePtr dd 0
OemProductNamePtr dd 0
OemProductRevPtr dd 0
VBE2_reserved times 222 db 0
VBE_OemData times 256 db 0
VESA_ModeInfo dd 0
VESA_Mode_Counter dw 0
VGA_Mode_Counter dw 0
VGA_ModeInfo dd 0
Graphics_Mode_Choosen db 1
Graphics_SubMode_Choosen db 0
TimerLoop dd 0
Current_X dw 0
Current_Y dw 0
....to a C struc...
typedef struct BIOSInfo
{
BYTE BootDrv;
ULONG BIOS_Mem_Entries;
BYTE APM_Status;
BYTE APM_Major_Version;
BYTE APM_Minor_Version;
ULONG APM_Code_Base;
ULONG APM_Data_Base;
ULONG APM_Data_Length;
ULONG APM_Code_Length;
//VESA Struct Start
BYTE VESA_Signature[4];
USHORT VESAVersion;
ULONG OemStringPtr;
ULONG Capabilities;
ULONG VideoModePtr;
USHORT TotalMemory;
//VBE2 tillägg
USHORT OemSoftwareRev;
ULONG OemVendorNamePtr;
ULONG OemProductNamePtr;
ULONG OemProductRevPtr;
BYTE VBE2_reserved[222];
BYTE VBE_OemData[256];
ULONG VESA_ModeInfo;
USHORT VESA_Mode_Counter;
USHORT VGA_Mode_Counter;
ULONG VGA_ModeInfo;
BYTE Graphics_Mode_Choosen;
BYTE Graphics_SubMode_Choosen;
ULONG TimerLoop;
USHORT Current_X;
USHORT Current_Y;
}BIOSInfo;
.... but for some reason:
BIOSInfo *BIOS_Info_Pointer = Get_ASM_Params();
ScreenMode[0] = BIOS_Info_Pointer->Graphics_Mode_Choosen;
ScreenMode[1] = BIOS_Info_Pointer->Graphics_SubMode_Choosen;
ScreenMode[0] isn't equal to 1 (Graphics_Mode_Choosen) and ScreenMode[1]
isn't equal to 0 (Graphics_SubMode_Choosen).
Can anybody give me a hint on what's wrong?
btw:
_Get_ASM_Params:
lea eax,[BootDrv]
ret
TIA!