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

Last change on this file since 589 was 589, checked in by krille_n_, 8 years ago

Changes:

  • BIOS: Fixed a purely cosmetic bug from r542 where, in builds containing MODULE_EBIOS, the boot menu would display an incorrect drive size (0.4 kB with MODULE_STRINGS_COMPRESSED or 0.5 kB without) for old drives with no support for LBA.
  • Fixed a bug from r392 where Vision_DetectAndReturnIDinAXandPortInDXifControllerPresent would return the ID in AL instead of AH (if DANGEROUS_DETECTION had been defined).
  • Fixed a bug from r587 in AdvAtaInit.asm that would prevent detection of QDI Vision controllers.
  • Also changed how the QDI Vision IDs are defined (removed the need for shifting) to avoid confusion. This fixed a potential bug from r587 in AdvAtaInit.asm where some IDs were not being shifted.
  • Fixed a bug in PDC20x30.asm from r587 where GetPdcIDtoAX would not return with the IDE base port in DX so DisablePdcProgrammingMode would fail.
  • Made some changes to ModuleDependency.inc and other files so that MODULE_ADVANCED_ATA now requires USE_386. Consequently it is no longer included in the regular AT-builds, only in the 386_8k-build.
  • Moved the UNROLL_SECTORS_IN_CX_TO_xWORDS macros from IDE_8bit.inc to IdeIO.inc which means it's now possible to build a BIOS without MODULE_8BIT_IDE.
  • XTIDECFG: Added a minimum DOS version check (since it needs DOS version 2+) to allow the program to quit gracefully in the unlikely scenario where someone tries to run it under DOS version 1.
  • Made some changes to Drive.asm to improve drive enumeration. The old method using GET_DOS_DRIVE_PARAMETER_BLOCK_FOR_SPECIFIC_DRIVE worked well in Windows XP but not in Windows 98 SE (in Windows or in DOS mode). The two problems were; 1) The function call would access the drives which on single floppy drive systems would cause Windows to swap between A: and B: (throwing a blue screen asking the user to insert a disk etc). 2) Only floppy drives and FAT16 drives would be available in the list of drives, no FAT32/optical/network drives.
  • Improved code in IdeControllerMenu.asm so that the default port addresses for all IDE interfaces are now restored when (re-)selecting the (same) type of IDE device.
  • Also made it impossible to select a device type unless the required module is included in the loaded BIOS.
  • The version check done when loading a BIOS now uses the FLASH_SIGNATURE definition from Version.inc. Any changes affecting RomVars now only requires updating that definition. This means that changes to RomVars must be implemented in both the BIOS and XTIDECFG before being committed to the repository.
  • Added a compatibility fix for 3Com 3C503 cards to the ROM checksumming code in Buffers.asm (Buffers_GenerateChecksum).
  • SerDrive: Made some minor changes to file names and paths to improve compatibility with case sensitive environments.
  • BIOSDRVS: Made a minor size optimization which as a side effect also makes it compatible with all DOS versions including DOS version 1.
  • Library: Renamed the WAIT_RETRACE_IF_NECESSARY_THEN macro to CALL_WAIT_FOR_RETRACE_IF_NECESSARY_THEN and made a tail-call-optimized version of it (JMP_WAIT_FOR_RETRACE_IF_NECESSARY_THEN).
  • A speed optimization to the eRCL_IM macro for 386 and higher. This change breaks emulation in the sense that the macro will fail when given a memory operand as the first parameter.
  • Other minor optimizations and fixes.
File size: 14.6 KB
Line 
1; Project name  :   XTIDE Universal BIOS
2; Authors       :   Tomi Tilli
3;               :   aitotat@gmail.com
4;               :
5;               :   Greg Lindhorst
6;               :   gregli@hotmail.com
7;               ;
8;               :   Krister Nordvall
9;               :   krille_n_@hotmail.com
10;               :
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
15;
16; XTIDE Universal BIOS and Associated Tools
17; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
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.
23;
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
27; GNU General Public License for more details.
28; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
29;
30
31    ORG 0                           ; Code start offset 0000h
32
33    ; We must define included libraries before including "AssemblyLibrary.inc".
34%define EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS   ; Exclude unused library functions
35%ifdef MODULE_BOOT_MENU
36    %define MENUEVENT_INLINE_OFFSETS        ; Only one menu required, save space and inline offsets
37    %define INCLUDE_MENU_LIBRARY
38    %define MENU_NO_ESC                     ; User cannot 'esc' out of the menu
39%else   ; If no boot menu included
40    %define INCLUDE_DISPLAY_LIBRARY
41    %define INCLUDE_KEYBOARD_LIBRARY
42    %define INCLUDE_TIME_LIBRARY
43%endif
44
45
46    ; Included .inc files
47    %include "AssemblyLibrary.inc"  ; Assembly Library. Must be included first!
48    %include "ModuleDependency.inc" ; Dependency checks for optional modules. Must be included second!
49    %include "Version.inc"
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
56    %include "BootVars.inc"         ; For BOOTVARS struct
57    %include "IdeIO.inc"            ; Macros for IDE port I/O
58    %include "DeviceIDE.inc"        ; For IDE device equates
59
60
61
62; Section containing code
63SECTION .text
64
65; ROM variables (must start at offset 0)
66CNT_ROM_BLOCKS      EQU     BIOS_SIZE / 512     ; number of 512B blocks, 16 = 8kB BIOS
67istruc ROMVARS
68    at  ROMVARS.wRomSign,   dw  0AA55h          ; PC ROM signature
69    at  ROMVARS.bRomSize,   db  CNT_ROM_BLOCKS  ; ROM size in 512B blocks
70    at  ROMVARS.rgbJump,    jmp Initialize_FromMainBiosRomSearch
71    at  ROMVARS.rgbSign,    db  FLASH_SIGNATURE
72    at  ROMVARS.szTitle,    db  TITLE_STRING
73    at  ROMVARS.szVersion,  db  ROM_VERSION_STRING
74
75;---------------------------;
76; AT Build default settings ;
77;---------------------------;
78%ifdef USE_AT
79    at  ROMVARS.wFlags,         dw  FLG_ROMVARS_FULLMODE | MASK_ROMVARS_INCLUDED_MODULES
80    at  ROMVARS.wDisplayMode,   dw  DEFAULT_TEXT_MODE
81%ifdef MODULE_BOOT_MENU
82    at  ROMVARS.wBootTimeout,   dw  BOOT_MENU_DEFAULT_TIMEOUT
83%endif
84    at  ROMVARS.bIdeCnt,        db  2                       ; Number of supported controllers
85    at  ROMVARS.bBootDrv,       db  80h                     ; Boot Menu default drive
86    at  ROMVARS.bMinFddCnt,     db  0                       ; Do not force minimum number of floppy drives
87    at  ROMVARS.bStealSize,     db  1                       ; Steal 1kB from base memory
88    at  ROMVARS.bIdleTimeout,   db  0                       ; Standby timer disabled by default
89
90    at  ROMVARS.ideVars0+IDEVARS.wBasePort,         dw  DEVICE_ATA_PRIMARY_PORT         ; Controller Command Block base port
91    at  ROMVARS.ideVars0+IDEVARS.wControlBlockPort, dw  DEVICE_ATA_PRIMARY_PORTCTRL     ; Controller Control Block base port
92    at  ROMVARS.ideVars0+IDEVARS.bDevice,           db  DEVICE_16BIT_ATA
93    at  ROMVARS.ideVars0+IDEVARS.bIRQ,              db  14
94    at  ROMVARS.ideVars0+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,  dw  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
95    at  ROMVARS.ideVars0+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,   dw  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
96
97    at  ROMVARS.ideVars1+IDEVARS.wBasePort,         dw  DEVICE_ATA_SECONDARY_PORT
98    at  ROMVARS.ideVars1+IDEVARS.wControlBlockPort, dw  DEVICE_ATA_SECONDARY_PORTCTRL
99    at  ROMVARS.ideVars1+IDEVARS.bDevice,           db  DEVICE_16BIT_ATA
100    at  ROMVARS.ideVars1+IDEVARS.bIRQ,              db  15
101    at  ROMVARS.ideVars1+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,  dw  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
102    at  ROMVARS.ideVars1+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,   dw  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
103
104    at  ROMVARS.ideVars2+IDEVARS.wBasePort,         dw  DEVICE_ATA_TERTIARY_PORT
105    at  ROMVARS.ideVars2+IDEVARS.wControlBlockPort, dw  DEVICE_ATA_TERTIARY_PORTCTRL
106    at  ROMVARS.ideVars2+IDEVARS.bDevice,           db  DEVICE_16BIT_ATA
107    at  ROMVARS.ideVars2+IDEVARS.bIRQ,              db  0
108    at  ROMVARS.ideVars2+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,  dw  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
109    at  ROMVARS.ideVars2+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,   dw  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
110
111    at  ROMVARS.ideVars3+IDEVARS.wBasePort,         dw  DEVICE_ATA_QUATERNARY_PORT
112    at  ROMVARS.ideVars3+IDEVARS.wControlBlockPort, dw  DEVICE_ATA_QUATERNARY_PORTCTRL
113    at  ROMVARS.ideVars3+IDEVARS.bDevice,           db  DEVICE_16BIT_ATA
114    at  ROMVARS.ideVars3+IDEVARS.bIRQ,              db  0
115    at  ROMVARS.ideVars3+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,  dw  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
116    at  ROMVARS.ideVars3+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,   dw  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
117
118%ifdef MODULE_SERIAL
119    at  ROMVARS.ideVarsSerialAuto+IDEVARS.bDevice,  db  DEVICE_SERIAL_PORT
120%endif
121%else
122;-----------------------------------;
123; XT and XT+ Build default settings ;
124;-----------------------------------;
125    at  ROMVARS.wFlags,         dw  MASK_ROMVARS_INCLUDED_MODULES
126    at  ROMVARS.wDisplayMode,   dw  DEFAULT_TEXT_MODE
127%ifdef MODULE_BOOT_MENU
128    at  ROMVARS.wBootTimeout,   dw  BOOT_MENU_DEFAULT_TIMEOUT
129%endif
130    at  ROMVARS.bIdeCnt,        db  1
131    at  ROMVARS.bBootDrv,       db  80h                     ; Boot Menu default drive
132    at  ROMVARS.bMinFddCnt,     db  0                       ; Do not force minimum number of floppy drives
133    at  ROMVARS.bStealSize,     db  1                       ; Steal 1kB from base memory in full mode
134    at  ROMVARS.bIdleTimeout,   db  0                       ; Standby timer disabled by default
135
136%ifndef MODULE_8BIT_IDE
137    at  ROMVARS.ideVars0+IDEVARS.wBasePort,         dw  DEVICE_ATA_PRIMARY_PORT         ; Controller Command Block base port
138    at  ROMVARS.ideVars0+IDEVARS.wControlBlockPort, dw  DEVICE_ATA_PRIMARY_PORTCTRL     ; Controller Control Block base port
139    at  ROMVARS.ideVars0+IDEVARS.bDevice,           db  DEVICE_16BIT_ATA
140%elifdef MODULE_8BIT_IDE_ADVANCED
141    at  ROMVARS.ideVars0+IDEVARS.wBasePort,         dw  DEVICE_XTIDE_DEFAULT_PORT       ; Controller Command Block base port
142    at  ROMVARS.ideVars0+IDEVARS.bDevice,           db  DEVICE_8BIT_XTCF_PIO8
143%else
144    at  ROMVARS.ideVars0+IDEVARS.wBasePort,         dw  DEVICE_XTIDE_DEFAULT_PORT       ; Controller Command Block base port
145    at  ROMVARS.ideVars0+IDEVARS.wControlBlockPort, dw  DEVICE_XTIDE_DEFAULT_PORTCTRL   ; Controller Control Block base port
146    at  ROMVARS.ideVars0+IDEVARS.bDevice,           db  DEVICE_8BIT_XTIDE_REV1
147%endif
148    at  ROMVARS.ideVars0+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,  db  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
149    at  ROMVARS.ideVars0+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,   db  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
150
151    at  ROMVARS.ideVars1+IDEVARS.wBasePort,         dw  DEVICE_ATA_SECONDARY_PORT
152    at  ROMVARS.ideVars1+IDEVARS.wControlBlockPort, dw  DEVICE_ATA_SECONDARY_PORTCTRL
153    at  ROMVARS.ideVars1+IDEVARS.bDevice,           db  DEVICE_16BIT_ATA
154    at  ROMVARS.ideVars1+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,  db  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
155    at  ROMVARS.ideVars1+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,   db  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
156
157    at  ROMVARS.ideVars2+IDEVARS.wBasePort,         dw  DEVICE_ATA_TERTIARY_PORT
158    at  ROMVARS.ideVars2+IDEVARS.wControlBlockPort, dw  DEVICE_ATA_TERTIARY_PORTCTRL
159    at  ROMVARS.ideVars2+IDEVARS.bDevice,           db  DEVICE_16BIT_ATA
160    at  ROMVARS.ideVars2+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,  db  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
161    at  ROMVARS.ideVars2+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,   db  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
162
163    at  ROMVARS.ideVars3+IDEVARS.wBasePort,         dw  DEVICE_ATA_QUATERNARY_PORT
164    at  ROMVARS.ideVars3+IDEVARS.wControlBlockPort, dw  DEVICE_ATA_QUATERNARY_PORTCTRL
165    at  ROMVARS.ideVars3+IDEVARS.bDevice,           db  DEVICE_16BIT_ATA
166    at  ROMVARS.ideVars3+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,  db  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
167    at  ROMVARS.ideVars3+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,   db  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
168
169%ifdef MODULE_SERIAL
170    at  ROMVARS.ideVarsSerialAuto+IDEVARS.bDevice,  db  DEVICE_SERIAL_PORT
171%endif
172%endif
173iend
174
175    ; Strings are first to avoid them moving unnecessarily when code is turned on and off with %ifdef's
176    ; since some groups of strings need to be on the same 256-byte page.
177    ;
178%ifdef MODULE_STRINGS_COMPRESSED
179    %define STRINGSCOMPRESSED_STRINGS
180    %include "StringsCompressed.asm"
181%else
182    %include "Strings.asm"          ; For BIOS message strings
183%endif
184
185    ; Libraries, data, Initialization and drive detection
186
187    %include "AssemblyLibrary.asm"
188
189    ; String compression tables need to come after the AssemblyLibrary (since they depend on addresses
190    ; established in the assembly library), and are unnecessary if strings are not compressed.
191    ;
192%ifdef MODULE_STRINGS_COMPRESSED
193    %undef  STRINGSCOMPRESSED_STRINGS
194    %define STRINGSCOMPRESSED_TABLES
195    %include "StringsCompressed.asm"
196%endif
197
198    %include "Initialize.asm"       ; For BIOS initialization
199    %include "Interrupts.asm"       ; For Interrupt initialization
200    %include "RamVars.asm"          ; For RAMVARS initialization and access
201    %include "BootVars.asm"         ; For initializing variables used during init and boot
202    %include "FloppyDrive.asm"      ; Floppy Drive related functions
203    %include "CreateDPT.asm"        ; For creating DPTs
204    %include "FindDPT.asm"          ; For finding DPTs
205    %include "AccessDPT.asm"        ; For accessing DPTs
206    %include "AtaGeometry.asm"      ; For generating L-CHS parameters
207    %include "DrvDetectInfo.asm"    ; For creating DRVDETECTINFO structs
208    %include "AtaID.asm"            ; For ATA Identify Device information
209    %include "DetectDrives.asm"     ; For detecting IDE drives
210    %include "DetectPrint.asm"      ; For printing drive detection strings
211%ifdef MODULE_COMPATIBLE_TABLES
212    %include "CompatibleDPT.asm"
213%endif
214
215    ; Hotkey Bar
216%ifdef MODULE_HOTKEYS
217    %include "HotkeyBar.asm"        ; For hotkeys during drive detection and boot menu
218%endif
219%ifdef MODULE_DRIVEXLATE
220    %include "DriveXlate.asm"       ; For swapping drive numbers, must come immediately after HotkeyBar.asm
221%endif
222
223    ; Boot menu
224%ifdef MODULE_BOOT_MENU
225    %include "BootMenu.asm"         ; For Boot Menu operations
226    %include "BootMenuEvent.asm"    ; For menu library event handling
227                                    ; NOTE: BootMenuPrint needs to come immediately after BootMenuEvent
228                                    ;       so that jump table entries in BootMenuEvent stay within 8-bits
229    %include "BootMenuPrint.asm"    ; For printing Boot Menu strings, also includes "BootMenuPrintCfg.asm"
230%endif
231
232    ; Boot loader
233%ifdef MODULE_VERY_LATE_INIT
234    %include "Int13hBiosInit.asm"
235%endif
236    %include "Int19h.asm"           ; For Int 19h, Boot Loader
237    %include "BootSector.asm"       ; For loading boot sector
238    %include "Int19hReset.asm"      ; INT 19h handler for proper system reset
239
240    ; For all device types
241    %include "Idepack.asm"
242    %include "Device.asm"
243    %include "Timer.asm"            ; For timeout and delay
244
245    ; IDE Device support
246%ifdef MODULE_ADVANCED_ATA
247    %include "AdvAtaInit.asm"       ; For initializing VLB and PCI controllers
248    %include "Vision.asm"           ; QDI Vision QD6500 and QD6580 support
249    %include "PDC20x30.asm"         ; Promise PDC 20230-C and 20630 support
250%endif
251    %include "IdeCommand.asm"
252%ifdef MODULE_8BIT_IDE_ADVANCED
253    %include "JrIdeTransfer.asm"    ; Must be included after IdeCommand.asm
254    %include "IdeDmaBlock.asm"
255%endif
256    %include "IdeTransfer.asm"
257    %include "IdePioBlock.asm"
258    %include "IdeWait.asm"
259    %include "IdeError.asm"         ; Must be included after IdeWait.asm
260    %include "IdeDPT.asm"
261    %include "IdeIO.asm"
262%ifdef MODULE_IRQ
263    %include "IdeIrq.asm"
264%endif
265
266    ; Serial Device support
267%ifdef MODULE_SERIAL                ; Serial Port Device support
268    %include "SerialCommand.asm"
269    %include "SerialDPT.asm"
270%endif
271
272    ; INT 13h Hard Disk BIOS functions
273    %include "Int13h.asm"           ; For Int 13h, Disk functions
274    %include "AH0h_HReset.asm"
275    %include "AH1h_HStatus.asm"
276    %include "AH2h_HRead.asm"
277    %include "AH3h_HWrite.asm"
278    %include "AH4h_HVerify.asm"
279    %include "AH8h_HParams.asm"
280    %include "AH9h_HInit.asm"
281    %include "AHCh_HSeek.asm"
282    %include "AH10h_HReady.asm"
283    %include "AH11h_HRecal.asm"
284    %include "AH15h_HSize.asm"
285%ifdef MODULE_8BIT_IDE_ADVANCED
286    %include "AH1Eh_XTCF.asm"
287%endif
288    %include "AH23h_HFeatures.asm"
289    %include "AH24h_HSetBlocks.asm"
290    %include "AH25h_HDrvID.asm"
291    %include "Address.asm"          ; For sector address translations
292    %include "Prepare.asm"          ; For buffer pointer normalization
293%ifdef MODULE_EBIOS
294    %include "AH42h_ExtendedReadSectors.asm"
295    %include "AH43h_ExtendedWriteSectors.asm"
296    %include "AH44h_ExtendedVerifySectors.asm"
297    %include "AH47h_ExtendedSeek.asm"
298    %include "AH48h_GetExtendedDriveParameters.asm"
299    %include "AH41h_CheckIfExtensionsPresent.asm"
300%endif
301
302
303; Although it's very unlikely to happen, we give warnings for builds that cannot be automatically checksummed due to the size being too large.
304; In some cases it's theoretically possible to checksum the build anyway (manually) which is why these are warnings and not errors.
305%if BIOS_SIZE = 8192                ; A small build, possibly a candidate for the ROM socket on a 3Com 3C503 card.
306    %if ($-$$) <= BIOS_SIZE         ; Only give warnings when the problem isn't obvious anyway.
307        %if ($-$$) > BIOS_SIZE - 3
308            %warning "This build is too large to be auto-checksummed!"
309        %endif
310    %endif
311%elif ($-$$) = BIOS_SIZE            ; A large build.
312    %warning "This build is too large to be auto-checksummed!"
313%endif
Note: See TracBrowser for help on using the repository browser.