Lines 243-251
void restore_state_from(char *data)
Link Here
|
243 |
r.eax = 0x4f04; |
243 |
r.eax = 0x4f04; |
244 |
r.ecx = 0xf; /* all states */ |
244 |
r.ecx = 0xf; /* all states */ |
245 |
r.edx = 2; /* restore state */ |
245 |
r.edx = 2; /* restore state */ |
246 |
r.es = (unsigned int) (data - LRMI_base_addr()) >> 4; |
246 |
r.es = (unsigned short) (((data - (char*) LRMI_base_addr()) >> 4) & 0xffff); |
247 |
r.ebx = (unsigned int) (data - LRMI_base_addr()) & 0xf; |
247 |
r.ebx = (unsigned int) ((data - (char*) LRMI_base_addr()) & 0xf); |
248 |
r.ds = 0x0040; |
248 |
r.ds = 0x0040; |
249 |
|
249 |
|
250 |
if (!LRMI_int(0x10, &r)) { |
250 |
if (!LRMI_int(0x10, &r)) { |
251 |
fprintf(stderr, |
251 |
fprintf(stderr, |
Lines 327-335
char *__save_state(int *psize)
Link Here
|
327 |
r.ecx = 0xf; /* all states */ |
327 |
r.ecx = 0xf; /* all states */ |
328 |
r.edx = 1; /* save state */ |
328 |
r.edx = 1; /* save state */ |
329 |
|
329 |
|
330 |
r.es = (unsigned int) (buffer - LRMI_base_addr()) >> 4; |
330 |
r.es = (unsigned short) (((buffer - (char*) LRMI_base_addr()) >> 4) & 0xffff); |
331 |
r.ebx = (unsigned int) (buffer - LRMI_base_addr()) & 0xf; |
331 |
r.ebx = (unsigned int) ((buffer - (char*) LRMI_base_addr()) & 0xf); |
332 |
r.ds = 0x0040; |
332 |
r.ds = 0x0040; |
333 |
|
333 |
|
334 |
fprintf(stderr, "ES: 0x%04X EBX: 0x%04X\n", r.es, r.ebx); |
334 |
fprintf(stderr, "ES: 0x%04X EBX: 0x%04X\n", r.es, r.ebx); |
335 |
|
335 |
|
Lines 525-532
int do_get_panel_id(int just_dimensions)
Link Here
|
525 |
.ebx = 0x0001 |
525 |
.ebx = 0x0001 |
526 |
}; |
526 |
}; |
527 |
struct panel_id *id = LRMI_alloc_real(sizeof(struct panel_id)); |
527 |
struct panel_id *id = LRMI_alloc_real(sizeof(struct panel_id)); |
528 |
r.es = (unsigned short)(((int)(id-LRMI_base_addr()) >> 4) & 0xffff); |
528 |
r.es = (unsigned short) (((id - LRMI_base_addr()) >> 4) & 0xffff); |
529 |
r.edi = (unsigned long)(id-LRMI_base_addr()) & 0xf; |
529 |
r.edi = (unsigned long) ((id - LRMI_base_addr()) & 0xf); |
530 |
|
530 |
|
531 |
if(sizeof(struct panel_id) != 32) |
531 |
if(sizeof(struct panel_id) != 32) |
532 |
return fprintf(stderr, "oops: panel_id, sizeof struct panel_id != 32, it's %ld...\n", sizeof(struct panel_id)), 7; |
532 |
return fprintf(stderr, "oops: panel_id, sizeof struct panel_id != 32, it's %ld...\n", sizeof(struct panel_id)), 7; |