Changeset 67785 in vbox for trunk/src/VBox/Devices/PC/BIOS
- Timestamp:
- Jul 5, 2017 8:46:04 AM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 116703
- Location:
- trunk/src/VBox/Devices/PC/BIOS
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS/biosint.h
r62509 r67785 170 170 uint16_t es; 171 171 uint16_t ds; 172 uint16_t ifl; 172 173 iret_addr_t ra; 173 174 } kbd_regs_t; -
trunk/src/VBox/Devices/PC/BIOS/keyboard.c
r63562 r67785 645 645 #define SP r.gr.u.r16.sp 646 646 #define FLAGS r.ra.flags.u.r16.flags 647 #define IFLGS r.ifl 647 648 648 649 /* Interrupt 16h service implementation. */ … … 686 687 687 688 case 0x01: /* check keyboard status */ 688 SET_IF(); /* Enable interrupts. Some callers depend on that! */ 689 /* Enable interrupts, preserve most flags. Some callers depend on that! */ 690 FLAGS = IFLGS; 689 691 if ( !dequeue_key(&scan_code, &ascii_code, 0) ) { 690 692 SET_ZF(); … … 763 765 764 766 case 0x11: /* check MF-II keyboard status */ 765 SET_IF(); 767 /* Enable interrupts, preserve most flags. Some callers depend on that! */ 768 FLAGS = IFLGS; 766 769 if ( !dequeue_key(&scan_code, &ascii_code, 0) ) { 767 770 SET_ZF(); -
trunk/src/VBox/Devices/PC/BIOS/notes.txt
r67694 r67785 12 12 emulation. 13 13 14 - Keystroke check (INT 16h, fn 01h/1 0h) always enables interrupts on return.14 - Keystroke check (INT 16h, fn 01h/11h) always enables interrupts on return. 15 15 DOS POWER.EXE depends on that in some situations. 16 17 - IBM DOS J5.00/V is even worse and does a far jump into INT 16h/11h after 18 pushing garbage on the stack. Using IRET directly may change IOPL, set 19 TF, change direction flag, etc. We have to use or simulate RETF 2 instead. 16 20 17 21 - MS-DOS 5.0/V setup assumes that INT 13h always returns with interrupts -
trunk/src/VBox/Devices/PC/BIOS/orgs.asm
r67694 r67785 873 873 int16_handler: 874 874 sti 875 ;; Flags are saved *after* enabling interrupts, and with 876 ;; implicitly cleared TF. Software may depend on that. 877 pushf 875 878 push es 876 879 push ds … … 888 891 pop ds 889 892 pop es 893 add sp, 2 ; Skip saved flags 890 894 iret 891 895 … … 915 919 pop ds 916 920 pop es 921 add sp, 2 ; Skip saved flags 917 922 ; TODO: review/enable? If so, flags should be restored here? 918 923 if 0
Note:
See TracChangeset
for help on using the changeset viewer.