Statistics
| Branch: | Revision:

root / pc-bios / bios.diff @ 71be0fc3

History | View | Annotate | Download (1.7 kB)

1
Index: rombios.c
2
===================================================================
3
RCS file: /cvsroot/bochs/bochs/bios/rombios.c,v
4
retrieving revision 1.130
5
diff -u -w -r1.130 rombios.c
6
--- rombios.c        13 Feb 2005 08:47:30 -0000        1.130
7
+++ rombios.c        6 Apr 2005 22:38:16 -0000
8
@@ -8570,7 +8570,10 @@
9
 use32 386
10
 #define APM_PROT32
11
 #include "apmbios.S"
12
+
13
 use16 386
14
+#define APM_PROT16
15
+#include "apmbios.S"
16
 
17
 #define APM_REAL
18
 #include "apmbios.S"
19
Index: apmbios.S
20
===================================================================
21
RCS file: /cvsroot/bochs/bochs/bios/apmbios.S,v
22
retrieving revision 1.1
23
diff -u -w -r1.1 apmbios.S
24
--- apmbios.S        20 Jun 2004 18:27:09 -0000        1.1
25
+++ apmbios.S        6 Apr 2005 22:38:16 -0000
26
@@ -1,6 +1,9 @@
27
 //  APM BIOS support for the Bochs BIOS
28
 //  Copyright (C) 2004 Fabrice Bellard
29
 //
30
+//  16-bit interface activation
31
+//  Copyright (C) 2005 Struan Bartlett
32
+//
33
 //  This library is free software; you can redistribute it and/or
34
 //  modify it under the terms of the GNU Lesser General Public
35
 //  License as published by the Free Software Foundation; either
36
@@ -111,13 +114,28 @@
37
   mov bl, #0x4d // 'M'
38
   // bit 0 : 16 bit interface supported
39
   // bit 1 : 32 bit interface supported
40
-  mov cx, #0x2 
41
+  mov cx, #0x3
42
   jmp APMSYM(ok)
43
   
44
 ;-----------------
45
 ; APM real mode interface connect
46
 APMSYM(01):
47
   cmp al, #0x01
48
+  jne APMSYM(02)
49
+  jmp APMSYM(ok)
50
+
51
+;-----------------
52
+; APM 16 bit protected mode interface connect
53
+APMSYM(02):
54
+  cmp al, #0x02
55
+  jne APMSYM(03)
56
+
57
+  mov bx, #_apm16_entry
58
+  
59
+  mov ax, #0xf000 // 16 bit code segment base
60
+  mov si, #0xfff0 // 16 bit code segment size
61
+  mov cx, #0xf000 // data segment address
62
+  mov di, #0xfff0 // data segment length
63
   jne APMSYM(03)
64
   jmp APMSYM(ok)
65