source: xtideuniversalbios/trunk/Assembly_Library/Inc/CMOS.inc@ 619

Last change on this file since 619 was 618, checked in by Krister Nordvall, 3 years ago

Changes:

  • Updated the BIOS makefile. Added the NO_ATAID_CORRECTION define back to the Tiny build as I've realized that the correction code should not be needed for builds without MODULE_EBIOS. Also added a new makefile target 'custom' to make it easier for people to make custom builds.
  • Fixed a bug where calling INT 13h/AH=15h for drives not handled by XUB (floppy drives for example) would return an error due to the fact that any non-zero return value in AH from the other BIOS would cause the CF to be set in Int13h_SetErrorCodeToIntpackInSSBPfromAH. The return path is now via Int13h_ReturnFromHandlerWithoutStoringErrorCode which means that no status/error code will be returned in the BDA but that should not be a problem as the other BIOS should do that anyway. This change also fixed another potential problem where return values in DL from the other BIOS were assumed to be drive numbers when MODULE_SERIAL_FLOPPY is included in the build.
  • Minor optimizations and fixes.
File size: 1.7 KB
Line 
1; Project name : Assembly Library
2; Description : Defines for accessing CMOS.
3
4;
5; XTIDE Universal BIOS and Associated Tools
6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2018 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%ifndef CMOS_INC
21%define CMOS_INC
22
23; CMOS Ports
24; Note that a data register read or write must follow every write to the address register
25CMOS_INDEX_REGISTER EQU 70h ; Is this write only?
26CMOS_DATA_REGISTER EQU 71h
27
28FLG_CMOS_INDEX_NMI_DISABLE EQU (1<<7) ; CMOS Index Register bit 7 is NMI disable/enable bit
29
30
31; Almost all of the CMOS locations are vendor specific and
32; there is very little standardization.
33HARD_DISK_TYPES EQU 12h ; Windows 9x reads this to check if IDE drives
34 ; are present so it should be safe to access this.
35 ; Bits 0...3 Hard Disk 1 type (Primary Slave)
36 ; Bits 4...7 Hard Disk 0 type (Primary Master)
37 ; Fh = Types 16...47 (defined elsewhere in CMOS)
38CHECKSUM_OF_BYTES_10hTo2Dh_LOW EQU 2Fh ; Most BIOSes store checksum of bytes 10h to 2Dh here
39CHECKSUM_OF_BYTES_10hTo2Dh_HIGH EQU 2Eh ; High byte of the checksum
40
41
42%endif ; CMOS_INC
Note: See TracBrowser for help on using the repository browser.