6 static BYTE cmosaddress
;
8 static BYTE cmosimage
[64] = {
9 0x27, 0x34, 0x31, 0x47, 0x16, 0x15, 0x00, 0x01,
10 0x04, 0x94, 0x26, 0x02, 0x50, 0x80, 0x00, 0x00,
11 0x40, 0xb1, 0x00, 0x9c, 0x01, 0x80, 0x02, 0x00,
12 0x1c, 0x00, 0x00, 0xad, 0x02, 0x10, 0x00, 0x00,
13 0x08, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00,
14 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x03, 0x58,
15 0x00, 0x1c, 0x19, 0x81, 0x00, 0x0e, 0x00, 0x80,
16 0x1b, 0x7b, 0x21, 0x00, 0x00, 0x00, 0x05, 0x5f };
18 void inportb(struct sigcontext_struct
*context
)
20 fprintf(stderr
, "IO: inb (%x)\n", EDX
& 0xffff);
25 EAX
= (EAX
& 0xffffff00L
) | cmosaddress
;
28 EAX
= (EAX
& 0xffffff00L
) | cmosimage
[cmosaddress
& 0x3f];
34 void inport(struct sigcontext_struct
*context
)
36 fprintf(stderr
, "IO: in (%x)\n", EDX
& 0xffff);
38 EAX
= (EAX
& 0xffff0000L
) | 0xffff;
41 void outportb(struct sigcontext_struct
*context
)
43 fprintf(stderr
, "IO: outb (%x), %x\n", EDX
& 0xffff, EAX
& 0xff);
48 cmosaddress
= EAX
& 0xff;
51 cmosimage
[cmosaddress
& 0x3f] = EAX
& 0xff;
57 void outport(struct sigcontext_struct
*context
)
59 fprintf(stderr
, "IO: out (%x), %x\n", EDX
& 0xffff, EAX
& 0xffff);