source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Src/Main.asm @ 592

Last change on this file since 592 was 592, checked in by krille_n_, 6 years ago

Changes:

  • The problem with NASM in the previous revision (r591) has been fixed.
  • The colors used by the boot menu and hotkey bar can now be customized by selecting one of a number of pre-defined color themes. Suggestions for additional themes are more than welcome!
  • Large builds are now 10 KB. Small builds are still 8 KB with the exception of the Tiny build which is now 4 KB. In other words, builds are now as small as possible to make it easier to combine them with other BIOSes.
  • Added code to the library to improve drive error handling. XTIDECFG can now handle "Drive Not Ready" errors.
  • Fixed a couple of potential bugs in AtaID.asm (AtaID_GetMaxPioModeToAXandMinCycleTimeToCX); 1) ATA1.bPioMode was treated as a WORD variable. 2) ATA2.bPIOSupp was assumed to be non-zero which would result in PIO mode 3 being returned if the assumption was wrong.
  • Made the same changes in the equivalent function used by BIOSDRVS (DisplayPioModeInformationUsingAtaInfoFromDSBX in AtaInfo.asm).
  • Fixed a bug from r587 in PDC20x30.asm in PDC20x30_GetMaxPioModeToALandMinPioCycleTimeToBX.
  • Fixed a bug from r523 in XTIDECFG where Auto Configure would only set the IRQ on one IDE interface on AT-builds.
  • XTIDECFG will now restore the default settings for the "Serial port virtual device" when reselecting it in the list of device types. This makes it behave consistently for all device types.
  • The eAAM macro is now used regardless if USE_UNDOC_INTEL is defined or not because it is apparently supported on all processors including the NEC V20/V30 CPUs.
  • Renamed the EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS define to EXCLUDE_FROM_XUB.
  • Added a define to exclude unused library code from BIOSDRVS (EXCLUDE_FROM_BIOSDRVS). This makes it a lot smaller than in previous revisions.
  • All unnecessary CLD-instructions are now under a new define 'CLD_NEEDED' which is only enabled for the BIOS. It is disabled for XTIDECFG and BIOSDRVS but can be enabled if needed by adding this define to the respective makefile. This change was made because these unnecessary instructions are wasteful and should never be needed. In fact, they only serve to hide bugs (in other peoples code) which I strongly believe should be avoided. I recommend people making their own BIOSes from source to not use this define as it's extremely unlikely to be needed.
  • Updated the copyright info in SerDrive and changed an URL to point to the new site.
  • Updated the copyright info and version number in BIOSDRVS.
  • Updated the copyright info in XTIDECFG.
  • Optimizations in general.
File size: 14.9 KB
RevLine 
[3]1; Project name  :   XTIDE Universal BIOS
[86]2; Authors       :   Tomi Tilli
3;               :   aitotat@gmail.com
4;               :
[181]5;               :   Greg Lindhorst
6;               :   gregli@hotmail.com
7;               ;
[86]8;               :   Krister Nordvall
9;               :   krille_n_@hotmail.com
10;               :
[3]11; Description   :   Main file for BIOS. This is the only file that needs
12;                   to be compiled since other files are included to this
13;                   file (so no linker needed, Nasm does it all).
14
[376]15;
[380]16; XTIDE Universal BIOS and Associated Tools
[526]17; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
[376]18;
19; This program is free software; you can redistribute it and/or modify
20; it under the terms of the GNU General Public License as published by
21; the Free Software Foundation; either version 2 of the License, or
22; (at your option) any later version.
[380]23;
[376]24; This program is distributed in the hope that it will be useful,
25; but WITHOUT ANY WARRANTY; without even the implied warranty of
26; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
[380]27; GNU General Public License for more details.
[376]28; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
29;
30
[294]31    ORG 0                           ; Code start offset 0000h
[3]32
[379]33    ; We must define included libraries before including "AssemblyLibrary.inc".
[592]34%define EXCLUDE_FROM_XUB                    ; Exclude unused library functions
[379]35%ifdef MODULE_BOOT_MENU
[567]36    %define MENUEVENT_INLINE_OFFSETS        ; Only one menu required, save space and inline offsets
[379]37    %define INCLUDE_MENU_LIBRARY
[567]38    %define MENU_NO_ESC                     ; User cannot 'esc' out of the menu
[379]39%else   ; If no boot menu included
40    %define INCLUDE_DISPLAY_LIBRARY
[392]41    %define INCLUDE_KEYBOARD_LIBRARY
[379]42    %define INCLUDE_TIME_LIBRARY
43%endif
44
45
[181]46    ; Included .inc files
47    %include "AssemblyLibrary.inc"  ; Assembly Library. Must be included first!
[522]48    %include "ModuleDependency.inc" ; Dependency checks for optional modules. Must be included second!
[358]49    %include "Version.inc"
[181]50    %include "ATA_ID.inc"           ; For ATA Drive Information structs
51    %include "IdeRegisters.inc"     ; For ATA Registers, flags and commands
52    %include "Int13h.inc"           ; Equates for INT 13h functions
53    %include "CustomDPT.inc"        ; For Disk Parameter Table
54    %include "RomVars.inc"          ; For ROMVARS and IDEVARS structs
55    %include "RamVars.inc"          ; For RAMVARS struct
[254]56    %include "BootVars.inc"         ; For BOOTVARS struct
[400]57    %include "IdeIO.inc"            ; Macros for IDE port I/O
[181]58    %include "DeviceIDE.inc"        ; For IDE device equates
[3]59
60
[397]61
[3]62; Section containing code
63SECTION .text
64
65; ROM variables (must start at offset 0)
[506]66CNT_ROM_BLOCKS      EQU     BIOS_SIZE / 512     ; number of 512B blocks, 16 = 8kB BIOS
[3]67istruc ROMVARS
68    at  ROMVARS.wRomSign,   dw  0AA55h          ; PC ROM signature
69    at  ROMVARS.bRomSize,   db  CNT_ROM_BLOCKS  ; ROM size in 512B blocks
[181]70    at  ROMVARS.rgbJump,    jmp Initialize_FromMainBiosRomSearch
[358]71    at  ROMVARS.rgbSign,    db  FLASH_SIGNATURE
72    at  ROMVARS.szTitle,    db  TITLE_STRING
73    at  ROMVARS.szVersion,  db  ROM_VERSION_STRING
[3]74
75;---------------------------;
76; AT Build default settings ;
77;---------------------------;
78%ifdef USE_AT
[397]79    at  ROMVARS.wFlags,         dw  FLG_ROMVARS_FULLMODE | MASK_ROMVARS_INCLUDED_MODULES
[143]80    at  ROMVARS.wDisplayMode,   dw  DEFAULT_TEXT_MODE
[397]81%ifdef MODULE_BOOT_MENU
[491]82    at  ROMVARS.wBootTimeout,   dw  BOOT_MENU_DEFAULT_TIMEOUT
[592]83    at  ROMVARS.pColorTheme,    dw  ColorTheme              ; Offset to the ATTRIBUTE_CHARS struc that holds the color theme
[397]84%endif
[485]85    at  ROMVARS.bIdeCnt,        db  2                       ; Number of supported controllers
[3]86    at  ROMVARS.bBootDrv,       db  80h                     ; Boot Menu default drive
87    at  ROMVARS.bMinFddCnt,     db  0                       ; Do not force minimum number of floppy drives
88    at  ROMVARS.bStealSize,     db  1                       ; Steal 1kB from base memory
[380]89    at  ROMVARS.bIdleTimeout,   db  0                       ; Standby timer disabled by default
[3]90
[491]91    at  ROMVARS.ideVars0+IDEVARS.wBasePort,         dw  DEVICE_ATA_PRIMARY_PORT         ; Controller Command Block base port
92    at  ROMVARS.ideVars0+IDEVARS.wControlBlockPort, dw  DEVICE_ATA_PRIMARY_PORTCTRL     ; Controller Control Block base port
[473]93    at  ROMVARS.ideVars0+IDEVARS.bDevice,           db  DEVICE_16BIT_ATA
[524]94    at  ROMVARS.ideVars0+IDEVARS.bIRQ,              db  14
[422]95    at  ROMVARS.ideVars0+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,  dw  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
96    at  ROMVARS.ideVars0+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,   dw  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
[3]97
[485]98    at  ROMVARS.ideVars1+IDEVARS.wBasePort,         dw  DEVICE_ATA_SECONDARY_PORT
99    at  ROMVARS.ideVars1+IDEVARS.wControlBlockPort, dw  DEVICE_ATA_SECONDARY_PORTCTRL
100    at  ROMVARS.ideVars1+IDEVARS.bDevice,           db  DEVICE_16BIT_ATA
[524]101    at  ROMVARS.ideVars1+IDEVARS.bIRQ,              db  15
[422]102    at  ROMVARS.ideVars1+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,  dw  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
103    at  ROMVARS.ideVars1+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,   dw  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
[3]104
[485]105    at  ROMVARS.ideVars2+IDEVARS.wBasePort,         dw  DEVICE_ATA_TERTIARY_PORT
106    at  ROMVARS.ideVars2+IDEVARS.wControlBlockPort, dw  DEVICE_ATA_TERTIARY_PORTCTRL
107    at  ROMVARS.ideVars2+IDEVARS.bDevice,           db  DEVICE_16BIT_ATA
[592]108    at  ROMVARS.ideVars2+IDEVARS.bIRQ,              db  0   ; Should be 11 on the GSI Inc. Model 2C
[422]109    at  ROMVARS.ideVars2+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,  dw  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
110    at  ROMVARS.ideVars2+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,   dw  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
[143]111
[473]112    at  ROMVARS.ideVars3+IDEVARS.wBasePort,         dw  DEVICE_ATA_QUATERNARY_PORT
113    at  ROMVARS.ideVars3+IDEVARS.wControlBlockPort, dw  DEVICE_ATA_QUATERNARY_PORTCTRL
114    at  ROMVARS.ideVars3+IDEVARS.bDevice,           db  DEVICE_16BIT_ATA
[592]115    at  ROMVARS.ideVars3+IDEVARS.bIRQ,              db  0   ; Should be 10 on the GSI Inc. Model 2C
[422]116    at  ROMVARS.ideVars3+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,  dw  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
117    at  ROMVARS.ideVars3+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,   dw  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
[175]118
119%ifdef MODULE_SERIAL
[589]120    at  ROMVARS.ideVarsSerialAuto+IDEVARS.bDevice,  db  DEVICE_SERIAL_PORT
[181]121%endif
[3]122%else
123;-----------------------------------;
124; XT and XT+ Build default settings ;
125;-----------------------------------;
[397]126    at  ROMVARS.wFlags,         dw  MASK_ROMVARS_INCLUDED_MODULES
[143]127    at  ROMVARS.wDisplayMode,   dw  DEFAULT_TEXT_MODE
[397]128%ifdef MODULE_BOOT_MENU
[491]129    at  ROMVARS.wBootTimeout,   dw  BOOT_MENU_DEFAULT_TIMEOUT
[592]130    at  ROMVARS.pColorTheme,    dw  ColorTheme              ; Offset to the ATTRIBUTE_CHARS struc that holds the color theme
[397]131%endif
[567]132    at  ROMVARS.bIdeCnt,        db  1
[3]133    at  ROMVARS.bBootDrv,       db  80h                     ; Boot Menu default drive
[461]134    at  ROMVARS.bMinFddCnt,     db  0                       ; Do not force minimum number of floppy drives
[3]135    at  ROMVARS.bStealSize,     db  1                       ; Steal 1kB from base memory in full mode
[380]136    at  ROMVARS.bIdleTimeout,   db  0                       ; Standby timer disabled by default
[3]137
[589]138%ifndef MODULE_8BIT_IDE
139    at  ROMVARS.ideVars0+IDEVARS.wBasePort,         dw  DEVICE_ATA_PRIMARY_PORT         ; Controller Command Block base port
140    at  ROMVARS.ideVars0+IDEVARS.wControlBlockPort, dw  DEVICE_ATA_PRIMARY_PORTCTRL     ; Controller Control Block base port
141    at  ROMVARS.ideVars0+IDEVARS.bDevice,           db  DEVICE_16BIT_ATA
142%elifdef MODULE_8BIT_IDE_ADVANCED
143    at  ROMVARS.ideVars0+IDEVARS.wBasePort,         dw  DEVICE_XTIDE_DEFAULT_PORT       ; Controller Command Block base port
144    at  ROMVARS.ideVars0+IDEVARS.bDevice,           db  DEVICE_8BIT_XTCF_PIO8
[559]145%else
[589]146    at  ROMVARS.ideVars0+IDEVARS.wBasePort,         dw  DEVICE_XTIDE_DEFAULT_PORT       ; Controller Command Block base port
147    at  ROMVARS.ideVars0+IDEVARS.wControlBlockPort, dw  DEVICE_XTIDE_DEFAULT_PORTCTRL   ; Controller Control Block base port
148    at  ROMVARS.ideVars0+IDEVARS.bDevice,           db  DEVICE_8BIT_XTIDE_REV1
[559]149%endif
[447]150    at  ROMVARS.ideVars0+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,  db  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
151    at  ROMVARS.ideVars0+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,   db  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
[143]152
[589]153    at  ROMVARS.ideVars1+IDEVARS.wBasePort,         dw  DEVICE_ATA_SECONDARY_PORT
154    at  ROMVARS.ideVars1+IDEVARS.wControlBlockPort, dw  DEVICE_ATA_SECONDARY_PORTCTRL
155    at  ROMVARS.ideVars1+IDEVARS.bDevice,           db  DEVICE_16BIT_ATA
[447]156    at  ROMVARS.ideVars1+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,  db  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
157    at  ROMVARS.ideVars1+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,   db  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
[143]158
[589]159    at  ROMVARS.ideVars2+IDEVARS.wBasePort,         dw  DEVICE_ATA_TERTIARY_PORT
160    at  ROMVARS.ideVars2+IDEVARS.wControlBlockPort, dw  DEVICE_ATA_TERTIARY_PORTCTRL
161    at  ROMVARS.ideVars2+IDEVARS.bDevice,           db  DEVICE_16BIT_ATA
[447]162    at  ROMVARS.ideVars2+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,  db  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
163    at  ROMVARS.ideVars2+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,   db  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
[143]164
[589]165    at  ROMVARS.ideVars3+IDEVARS.wBasePort,         dw  DEVICE_ATA_QUATERNARY_PORT
166    at  ROMVARS.ideVars3+IDEVARS.wControlBlockPort, dw  DEVICE_ATA_QUATERNARY_PORTCTRL
167    at  ROMVARS.ideVars3+IDEVARS.bDevice,           db  DEVICE_16BIT_ATA
[447]168    at  ROMVARS.ideVars3+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,  db  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
169    at  ROMVARS.ideVars3+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,   db  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
[175]170
171%ifdef MODULE_SERIAL
[589]172    at  ROMVARS.ideVarsSerialAuto+IDEVARS.bDevice,  db  DEVICE_SERIAL_PORT
[3]173%endif
[181]174%endif
[3]175iend
176
[380]177    ; Strings are first to avoid them moving unnecessarily when code is turned on and off with %ifdef's
[334]178    ; since some groups of strings need to be on the same 256-byte page.
179    ;
180%ifdef MODULE_STRINGS_COMPRESSED
181    %define STRINGSCOMPRESSED_STRINGS
[380]182    %include "StringsCompressed.asm"
[334]183%else
184    %include "Strings.asm"          ; For BIOS message strings
185%endif
186
[248]187    ; Libraries, data, Initialization and drive detection
[334]188
[181]189    %include "AssemblyLibrary.asm"
[334]190
191    ; String compression tables need to come after the AssemblyLibrary (since they depend on addresses
[380]192    ; established in the assembly library), and are unnecessary if strings are not compressed.
[334]193    ;
194%ifdef MODULE_STRINGS_COMPRESSED
[380]195    %undef  STRINGSCOMPRESSED_STRINGS
[334]196    %define STRINGSCOMPRESSED_TABLES
197    %include "StringsCompressed.asm"
198%endif
[380]199
[248]200    %include "Initialize.asm"       ; For BIOS initialization
201    %include "Interrupts.asm"       ; For Interrupt initialization
202    %include "RamVars.asm"          ; For RAMVARS initialization and access
[399]203    %include "BootVars.asm"         ; For initializing variables used during init and boot
[392]204    %include "FloppyDrive.asm"      ; Floppy Drive related functions
[285]205    %include "CreateDPT.asm"        ; For creating DPTs
206    %include "FindDPT.asm"          ; For finding DPTs
[181]207    %include "AccessDPT.asm"        ; For accessing DPTs
[421]208    %include "AtaGeometry.asm"      ; For generating L-CHS parameters
[397]209    %include "DrvDetectInfo.asm"    ; For creating DRVDETECTINFO structs
[181]210    %include "AtaID.asm"            ; For ATA Identify Device information
211    %include "DetectDrives.asm"     ; For detecting IDE drives
212    %include "DetectPrint.asm"      ; For printing drive detection strings
[550]213%ifdef MODULE_COMPATIBLE_TABLES
214    %include "CompatibleDPT.asm"
215%endif
[395]216
217    ; Hotkey Bar
218%ifdef MODULE_HOTKEYS
[392]219    %include "HotkeyBar.asm"        ; For hotkeys during drive detection and boot menu
[526]220%endif
[492]221%ifdef MODULE_DRIVEXLATE
222    %include "DriveXlate.asm"       ; For swapping drive numbers, must come immediately after HotkeyBar.asm
[395]223%endif
[248]224
[181]225    ; Boot menu
[379]226%ifdef MODULE_BOOT_MENU
[181]227    %include "BootMenu.asm"         ; For Boot Menu operations
228    %include "BootMenuEvent.asm"    ; For menu library event handling
[192]229                                    ; NOTE: BootMenuPrint needs to come immediately after BootMenuEvent
[258]230                                    ;       so that jump table entries in BootMenuEvent stay within 8-bits
231    %include "BootMenuPrint.asm"    ; For printing Boot Menu strings, also includes "BootMenuPrintCfg.asm"
[379]232%endif
233
234    ; Boot loader
[567]235%ifdef MODULE_VERY_LATE_INIT
[560]236    %include "Int13hBiosInit.asm"
237%endif
[379]238    %include "Int19h.asm"           ; For Int 19h, Boot Loader
[492]239    %include "BootSector.asm"       ; For loading boot sector
[392]240    %include "Int19hReset.asm"      ; INT 19h handler for proper system reset
[3]241
[181]242    ; For all device types
[192]243    %include "Idepack.asm"
[181]244    %include "Device.asm"
245    %include "Timer.asm"            ; For timeout and delay
[155]246
[181]247    ; IDE Device support
[363]248%ifdef MODULE_ADVANCED_ATA
249    %include "AdvAtaInit.asm"       ; For initializing VLB and PCI controllers
250    %include "Vision.asm"           ; QDI Vision QD6500 and QD6580 support
[587]251    %include "PDC20x30.asm"         ; Promise PDC 20230-C and 20630 support
[363]252%endif
[181]253    %include "IdeCommand.asm"
[493]254%ifdef MODULE_8BIT_IDE_ADVANCED
[400]255    %include "JrIdeTransfer.asm"    ; Must be included after IdeCommand.asm
[480]256    %include "IdeDmaBlock.asm"
[400]257%endif
258    %include "IdeTransfer.asm"
[473]259    %include "IdePioBlock.asm"
[192]260    %include "IdeWait.asm"
[294]261    %include "IdeError.asm"         ; Must be included after IdeWait.asm
[181]262    %include "IdeDPT.asm"
263    %include "IdeIO.asm"
[398]264%ifdef MODULE_IRQ
[181]265    %include "IdeIrq.asm"
[398]266%endif
[155]267
[400]268    ; Serial Device support
[181]269%ifdef MODULE_SERIAL                ; Serial Port Device support
270    %include "SerialCommand.asm"
271    %include "SerialDPT.asm"
[175]272%endif
[155]273
[181]274    ; INT 13h Hard Disk BIOS functions
275    %include "Int13h.asm"           ; For Int 13h, Disk functions
[529]276    %include "AH0h_HReset.asm"
277    %include "AH1h_HStatus.asm"
278    %include "AH2h_HRead.asm"
279    %include "AH3h_HWrite.asm"
280    %include "AH4h_HVerify.asm"
281    %include "AH8h_HParams.asm"
282    %include "AH9h_HInit.asm"
283    %include "AHCh_HSeek.asm"
284    %include "AH10h_HReady.asm"
285    %include "AH11h_HRecal.asm"
286    %include "AH15h_HSize.asm"
[493]287%ifdef MODULE_8BIT_IDE_ADVANCED
[471]288    %include "AH1Eh_XTCF.asm"
289%endif
[529]290    %include "AH23h_HFeatures.asm"
291    %include "AH24h_HSetBlocks.asm"
292    %include "AH25h_HDrvID.asm"
[221]293    %include "Address.asm"          ; For sector address translations
294    %include "Prepare.asm"          ; For buffer pointer normalization
[176]295%ifdef MODULE_EBIOS
[181]296    %include "AH42h_ExtendedReadSectors.asm"
297    %include "AH43h_ExtendedWriteSectors.asm"
298    %include "AH44h_ExtendedVerifySectors.asm"
299    %include "AH47h_ExtendedSeek.asm"
300    %include "AH48h_GetExtendedDriveParameters.asm"
[221]301    %include "AH41h_CheckIfExtensionsPresent.asm"
[176]302%endif
[589]303
304
[592]305%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
[589]306; Although it's very unlikely to happen, we give warnings for builds that cannot be automatically checksummed due to the size being too large.
307; In some cases it's theoretically possible to checksum the build anyway (manually) which is why these are warnings and not errors.
308%if BIOS_SIZE = 8192                ; A small build, possibly a candidate for the ROM socket on a 3Com 3C503 card.
309    %if ($-$$) <= BIOS_SIZE         ; Only give warnings when the problem isn't obvious anyway.
310        %if ($-$$) > BIOS_SIZE - 3
311            %warning "This build is too large to be auto-checksummed!"
312        %endif
313    %endif
[592]314%elif ($-$$) = BIOS_SIZE            ; A large or tiny build.
[589]315    %warning "This build is too large to be auto-checksummed!"
316%endif
[592]317%endif
Note: See TracBrowser for help on using the repository browser.