#include #include #include #include "msdos.h" #include "wine.h" static BYTE cmosaddress; static BYTE cmosimage[64] = { 0x27, 0x34, 0x31, 0x47, 0x16, 0x15, 0x00, 0x01, 0x04, 0x94, 0x26, 0x02, 0x50, 0x80, 0x00, 0x00, 0x40, 0xb1, 0x00, 0x9c, 0x01, 0x80, 0x02, 0x00, 0x1c, 0x00, 0x00, 0xad, 0x02, 0x10, 0x00, 0x00, 0x08, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x03, 0x58, 0x00, 0x1c, 0x19, 0x81, 0x00, 0x0e, 0x00, 0x80, 0x1b, 0x7b, 0x21, 0x00, 0x00, 0x00, 0x05, 0x5f }; void inportb(struct sigcontext_struct *context) { fprintf(stderr, "IO: inb (%x)\n", EDX & 0xffff); switch(EDX & 0xffff) { case 0x70: EAX = (EAX & 0xffffff00L) | cmosaddress; break; case 0x71: EAX = (EAX & 0xffffff00L) | cmosimage[cmosaddress & 0x3f]; break; default: } } void inport(struct sigcontext_struct *context) { fprintf(stderr, "IO: in (%x)\n", EDX & 0xffff); EAX = (EAX & 0xffff0000L) | 0xffff; } void outportb(struct sigcontext_struct *context) { fprintf(stderr, "IO: outb (%x), %x\n", EDX & 0xffff, EAX & 0xff); switch (EDX & 0xffff) { case 0x70: cmosaddress = EAX & 0x7f; break; case 0x71: cmosimage[cmosaddress & 0x3f] = EAX & 0xff; break; default: } } void outport(struct sigcontext_struct *context) { fprintf(stderr, "IO: out (%x), %x\n", EDX & 0xffff, EAX & 0xffff); }