source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13hBiosInit.asm@ 553

Last change on this file since 553 was 553, checked in by aitotat@…, 12 years ago

Changes to XTIDE Universal BIOS:

  • Standard boot procedure (INT 19h) works again.
File size: 2.0 KB
Line 
1; Project name : XTIDE Universal BIOS
2; Description : Int 13h handler that is used to initialize
3; XTIDE Universal BIOS when our INT 19h was not called.
4
5;
6; XTIDE Universal BIOS and Associated Tools
7; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
8;
9; This program is free software; you can redistribute it and/or modify
10; it under the terms of the GNU General Public License as published by
11; the Free Software Foundation; either version 2 of the License, or
12; (at your option) any later version.
13;
14; This program is distributed in the hope that it will be useful,
15; but WITHOUT ANY WARRANTY; without even the implied warranty of
16; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17; GNU General Public License for more details.
18; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19;
20
21; Section containing code
22SECTION .text
23
24TEMPORARY_VECTOR_FOR_SYSTEM_INT13h EQU 21h ; MS-DOS
25
26
27Int13hBiosInit_Handler:
28 LOAD_BDA_SEGMENT_TO ds, ax
29
30 ; Now install our handler and call 19h since non-standard motherboard BIOS did not
31 ; do that or our INT 19h hander was replaced by other BIOS.
32 mov WORD [BIOS_BOOT_LOADER_INTERRUPT_19h*4], Int19h_BootLoaderHandler
33 mov [BIOS_BOOT_LOADER_INTERRUPT_19h*4+2], cs
34 int BIOS_BOOT_LOADER_INTERRUPT_19h ; Does not return
35
36
37;--------------------------------------------------------------------
38; Int13hBiosInit_RestoreSystemHandler
39; Parameters:
40; Nothing
41; Returns:
42; Nothing
43; Corrupts registers:
44; AX, DS, ES
45;--------------------------------------------------------------------
46Int13hBiosInit_RestoreSystemHandler:
47 LOAD_BDA_SEGMENT_TO ds, ax
48
49 ; Is our very late init handler in place
50 cmp WORD [BIOS_DISK_INTERRUPT_13h*4], Int13hBiosInit_Handler
51 jne SHORT .SystemHandlerAlreadyInPlace
52
53 les ax, [TEMPORARY_VECTOR_FOR_SYSTEM_INT13h*4]
54 mov [BIOS_DISK_INTERRUPT_13h*4], ax
55 mov [BIOS_DISK_INTERRUPT_13h*4+2], es
56.SystemHandlerAlreadyInPlace:
57 ret
Note: See TracBrowser for help on using the repository browser.