source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h/Int19hReset.asm @ 597

Last change on this file since 597 was 597, checked in by aitotat, 6 years ago

Windows 95 CMOS hack now works with Award BIOSes.
Some small optimizations to INT 19h and INT 19h reset handlers.
Added menuitem to configurator for clearing BDA drive count.

File size: 1.7 KB
Line 
1; Project name  :   XTIDE Universal BIOS
2; Description   :   Int 19h Handler (Boot Loader).
3
4;
5; XTIDE Universal BIOS and Associated Tools
6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
7;
8; This program is free software; you can redistribute it and/or modify
9; it under the terms of the GNU General Public License as published by
10; the Free Software Foundation; either version 2 of the License, or
11; (at your option) any later version.
12;
13; This program is distributed in the hope that it will be useful,
14; but WITHOUT ANY WARRANTY; without even the implied warranty of
15; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16; GNU General Public License for more details.
17; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
18;
19
20; Section containing code
21SECTION .text
22
23;--------------------------------------------------------------------
24; INT 19h handler that properly reboots the computer when
25; INT 19h is called.
26;
27; Int19hReset_Handler
28;   Parameters:
29;       Nothing
30;   Returns:
31;       Never returns (reboots computer)
32;--------------------------------------------------------------------
33Int19hReset_Handler:
34    ; Try to boot from drive A.
35    ; This is needed if INT 19h is used to launch booter games while
36    ; preserving interrupt vector table (for example to hook interrupt 10h)
37    xor     dx, dx      ; Drive 00h
38    call    BootSector_LoadFirstSectorFromDriveDL
39    jc      SHORT .Reboot
40    cmp     WORD [bx+510], 0AA55h   ; Valid boot sector?
41    je      SHORT Int19h_JumpToBootSectorInESBXOrRomBootWithoutStackChange
42
43    ; Do warm reset since boot from floppy drive failed
44.Reboot:
45    mov     ax, BOOT_FLAG_WARM              ; Skip memory tests
46    jmp     Reboot_ComputerWithBootFlagInAX
Note: See TracBrowser for help on using the repository browser.