Anyway,
I need to set my struct the ES:DI in C.
I hate asm this is what I am tring to adapt:
Code: Select all
/*Copied this from Turbo C dos.h file*/
#define FP_OFF(fp) ((unsigned)(fp))
#define FP_SEG(fp) ((unsigned)((unsigned long)(fp) >> 16))
void vesa()
{
int temp;
_AX = 0x4F00;
_ES = FP_SEG(&info);
_DI = FP_OFF(&info);
asm int 10h;
temp = _AX;
if (temp != 0x004f) { printf("Failed"); }
}
Code: Select all
reg.r_ax = 0x4F00;
reg.r_es = FP_SEG(&info);
reg.r_di = FP_OFF(&info);
intr(0x10, ®);
if (reg.r_ax != 0x004f) { printf("Fail"); }
The original passes on my computer, and my version fails, I have no clue why, you guys see anything ?
Thanks in advance,
Rich