source: trunk/bootcode/airboot.asm@ 241

Last change on this file since 241 was 234, checked in by Ben Rietbroek, 7 years ago

Updated the charset loading logic [v1.1.5-testing]

This can now inject custom glyphs at any code-point and optionally
remap the original character somewhere else.

For Spanish, two custom CP850 glyphs, 0xb5 and 0xe0, are used.
And the original glyph at code-point 0xb5, which is a box-character that
AiR-BOOT uses, is remapped to code-point 0xd9.

Translator-build 'AiR-BOOT-v1.1.5-ES-TESTBUILD-20180705' was created
from this commit.

CAUTION:
This is a testbuild !
AirBoot uses the BIOS to access disks and a small coding error can trash
partition tables or other vital disk structures. You are advised to make
backups of TRACK0 and EBRs before using this testbuild. More info at:
https://rousseaux.github.io/netlabs.air-boot/pdf/AirBoot-v1.1.4-manual.pdf

File size: 101.0 KB
Line 
1;
2; AiR-BOOT (c) Copyright 1998-2008 M. Kiewitz
3;
4; This file is part of AiR-BOOT
5;
6; AiR-BOOT is free software: you can redistribute it and/or modify it under
7; the terms of the GNU General Public License as published by the Free
8; Software Foundation, either version 3 of the License, or (at your option)
9; any later version.
10;
11; AiR-BOOT is distributed in the hope that it will be useful, but WITHOUT ANY
12; WARRANTY: without even the implied warranty of MERCHANTABILITY or FITNESS
13; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14; details.
15;
16; You should have received a copy of the GNU General Public License along with
17; AiR-BOOT. If not, see <http://www.gnu.org/licenses/>.
18;
19
20
21
22
23
24
25
26;##############################################################################
27; AiR-BOOT / DEFINITIONS
28;##############################################################################
29
30;
31; This one should never be undefined, but if so, then default to English.
32;
33IFNDEF BLD_LANG
34BLD_LANG EQU en
35ENDIF
36
37;
38; Include AiR-BOOT Version Information.
39; This version-info is defined using simpel EQU's so it can serve as a
40; single source for other formats. The AiR-BOOT signature and the
41; OS/2 BLDLEVEL use this basic version information.
42;
43include ../include/version.inc
44
45;
46; Include OS/2 BLDLEVEL Information.
47; It uses the version-information in VERSION.INC to build it's signature.
48;
49include bldlevel.inc
50
51;
52; Include some macro's.
53; This file contains the ORIGIN macro that is used to detect overlaps.
54;
55include ../include/asm.inc
56
57;
58; The BLD_LANG is passed as an unquoted string so it can be used with
59; the 'include' directive. But for other language conditional actions a quoted
60; version is needed. This macro creates BLD_LANG_TXT holding the language
61; in single quotes.
62;
63enquote BLD_LANG,%BLD_LANG
64
65; We actually don't want to use this directive because it generates extra
66; NOP instructions that we can do without.
67; TASM also has a bug in that when the .ERR2 directive is used when
68; the .386 directive is in effect, the JUMPS directive is also active
69; and cannot be turned off.
70; NOJUMPS seems to have no effect in this situation.
71; In this case 4 NOP instructions are generated after forward referencing jump
72; instructions, to allow for automatic recoding by TASM.
73; This seems to be a TASM bug. (v2,v3,v4, dunno v5)
74IFDEF TASM
75 ;~ JUMPS
76ENDIF
77
78
79;
80; If defined then each module is prefixed with it's name.
81; This is used for debugging purposes but it also increases code space.
82; It should be off in release code.
83;
84;~ MODULE_NAMES EQU
85
86
87
88; -----------------------------------------------------------------------------
89; DEBUG
90; -----------------------------------------------------------------------------
91
92;
93; Enable this to include Debug Modules and enable COM-port debugging.
94; To have room for the debug-code, the FX-code can only be enabled
95; when AUX_DEBUG is not defined.
96;
97;~ AUX_DEBUG EQU
98
99
100;
101; The FX (video animation) module is about to be completely removed from the
102; build to regain code space. This is especially true for non-EN builds,
103; which often have longer strings or even load special character sets.
104;
105; However, because the EN-build for REALEASE-v1.1.2 was already distributed
106; with ArcaOS v5, FX will only be excluded for non-EN builds. When FX is not
107; compiled-in and Cooper Bars is enabled in the SETUP, the TAB-key used for
108; switching between MENU and PRE-BOOT screens will not work.
109;
110; Upcoming releases will completely remove FX related code and SETUP options.
111;
112; As can be read in 'special/fx.asm' around line 26, this removal may have
113; severe consequences for me, so if no new AiR-BOOT releases appear, then you
114; know I have been './'-ted, which most probably will be something completely
115; different from being 'slash-dotted' ... ;)
116;
117
118;~ IF BLD_LANG_TXT EQ 'en'
119;~ IFNDEF AUX_DEBUG
120;~ FX_ENABLED EQU
121;~ ENDIF
122;~ ELSE
123 ;~ echo
124 ;~ echo ***** NOTE: Excluding FX-module for this language ! *****
125 ;~ echo
126;~ ENDIF
127
128echo
129echo *** NOTE: As of v1.1.4-RELEASE the FX-module is excluded to save space ***
130echo
131
132; -----------------------------------------------------------------------------
133; AUX
134; -----------------------------------------------------------------------------
135;
136; bits 7-5 = datarate
137; (000=110,001=150,010=300,011=600,100=1200,101=2400,110=4800,111=9600 bps)
138; bits 4-3 = parity
139; (00 or 10 = none, 01 = odd, 11 = even)
140; bit 2 = stop-bits
141; (set = 2 stop-bits, clear = 1 stop-bit)
142; bits 1-0 = data-bits
143; (00 = 5, 01 = 6, 10 = 7, 11 = 8)
144;
145
146; 9600 bps, no parity, 1 stop-bit, 8 bits per char
147AUX_INIT_PARMS EQU 11100011b
148
149; Com-port for debugging, 0 is disabled
150BIOS_COM_PORT EQU 1
151
152; Default word value for BIOS_AuxParms variable
153; Note that is has moved since v1.07
154BIOS_AUXPARMS_DEFAULT EQU (AUX_INIT_PARMS SHL 8) OR BIOS_COM_PORT
155
156; Default byte value for BIOS_BootDisk variable
157BIOS_BOOTDISK_DEFAULT EQU 80h
158
159
160
161; -----------------------------------------------------------------------------
162; LABELS
163; -----------------------------------------------------------------------------
164; Address labels after code-move
165BootBaseSeg equ 08000h ; Pre-boot, in the low 640K
166BootBasePtr equ 0h ; We put our MBR to this location
167BootBaseExec equ BootBasePtr+offset MBR_RealStart
168StackSeg equ 07000h ; Put the stack below the code
169StartBaseSeg equ 00000h ; Pre-boot, we are in low memory
170StartBasePtr equ 07C00h ; BIOS starts our MBR at 0:7C00
171
172
173
174; -----------------------------------------------------------------------------
175; VIDEO
176; -----------------------------------------------------------------------------
177; Video pages, no INT 10h is used for menu-drawing etc.
178VideoIO_Page0 equ 0B800h
179VideoIO_Page1 equ 0B900h
180VideoIO_Page2 equ 0BA00h
181VideoIO_Page4 equ 0BC00h
182VideoIO_FXSegment equ 0A000h
183
184; Special line-drawing characters
185TextChar_WinLineRight equ 0C4h
186TextChar_WinLineDown equ 0B3h
187TextChar_WinRep1 equ 0D1h
188TextChar_WinRep2 equ 0C5h
189TextChar_WinRep3 equ 0CFh
190
191; Remap the box-char for Spanish
192IF BLD_LANG_TXT EQ 'es'
193TextChar_WinRep4 equ 0D9h ; Remapped box-char for ES
194ELSE
195TextChar_WinRep4 equ 0B5h ; Normal box-char
196ENDIF
197
198TextChar_WinRep5 equ 0C6h
199TextChar_WinRep6 equ 0D8h
200
201
202; -----------------------------------------------------------------------------
203; DISK INFORMATION
204; -----------------------------------------------------------------------------
205; Offsets into the DISKINFO structures located in the array [DiskInformation]
206
207; BIOS disk number and MBR flags
208LocDISKINFO_DiskNum equ 00h ; BYTE - BIOS disk number (80h etc)
209LocDISKINFO_MbrFlags equ 01h ; BYTE - Valid MBR, etc
210
211; BIOS INT13 Info
212LocDISKINFO_I13_Secs equ 02h ; WORD - Max 63
213LocDISKINFO_I13_Heads equ 04h ; WORD - Max 16 or 255
214LocDISKINFO_I13_Cyls equ 06h ; WORD - Max 1024
215
216; BIOS INT13X Info
217LocDISKINFO_I13X_Flags equ 08h ; WORD - CHS valid, etc
218LocDISKINFO_I13X_SecSize equ 0ah ; WORD - Normally 512 bytes
219LocDISKINFO_I13X_Secs equ 0ch ; DWORD - Max 63 ?
220LocDISKINFO_I13X_Heads equ 10h ; DWORD - Max 255 ?
221LocDISKINFO_I13X_Cyls equ 14h ; DWORD - Max 2_32 (4294967296)
222LocDISKINFO_I13X_SecsLBA equ 18h ; QWORD - Max 2^64 (4294967296^2)
223LocDISKINFO_I13X_HostBus equ 20h ; 4 bytes
224LocDISKINFO_I13X_Interface equ 24h ; 8 bytes
225
226; OS/2 LVM Info
227LocDISKINFO_LVM_Flags equ 2ch ; WORD - OS/2 ext geo, etc
228LocDISKINFO_LVM_MasterLBA equ 2eh ; DWORD - Max 254
229LocDISKINFO_LVM_Secs equ 32h ; DWORD - Max 255
230LocDISKINFO_LVM_Heads equ 36h ; DWORD - Max 255
231LocDISKINFO_LVM_Cyls equ 3ah ; DWORD - Max 65536
232
233; Custom Info
234LocDISKINFO_Flags equ 3eh ; WORD - Custom flags, dunno yet
235
236; Size of this structure
237DISKINFO_Size equ 40h ; Size to be allocated
238
239
240; -----------------------------------------------------------------------------
241; PARTITION TABLE
242; -----------------------------------------------------------------------------
243; Offsets for Partition-Entries in MBR/EBRs
244LocBRPT_LenOfEntry equ 16 ; Length of a standard MBR or EPR entry
245LocBRPT_Flags equ 0 ; Bootable, Hidden, etc.
246LocBRPT_BeginCHS equ 1 ; Packed CHS value
247LocBRPT_BeginHead equ 1 ; Start head, usually < 16
248LocBRPT_BeginSector equ 2 ; Start sector, max 63 + cyl high bits
249LocBRPT_BeginCylinder equ 3 ; Start cylinder 8+2 bits, max 1023
250LocBRPT_SystemID equ 4 ; Type of system using the partition
251LocBRPT_EndCHS equ 5 ; Packed CHS value
252LocBRPT_EndHead equ 5 ; End head, usually < 16
253LocBRPT_EndSector equ 6 ; End sector, max 63 + cyl high bits
254LocBRPT_EndCylinder equ 7 ; End cylinder 8+2 bits, max 1023
255LocBRPT_RelativeBegin equ 8 ; LBA32 address of partition
256LocBRPT_AbsoluteLength equ 12 ; 32-bit length of partition
257
258; Signature relative to start of MBR/EBR
259LocBR_Magic equ 510 ; Offset of 0AA55h signature
260
261
262; -----------------------------------------------------------------------------
263; LVM RECORD
264; -----------------------------------------------------------------------------
265; Used as a quick compare in LVM.ASM
266LocLVM_SignatureByte0 equ 02h
267
268; Offsets for LVM Information Sector.
269; These are relative to the start of the LVM sector.
270LocLVM_SignatureStart equ 00h ; 02h,'RMBPMFD' (8 bytes)
271LocLVM_CRC equ 08h ; CRC is a DWORD
272LocLVM_Heads equ 1ch ; Number of heads
273LocLVM_Secs equ 20h ; Sectors per Track
274LocLVM_DiskName equ 24h ; Name of the disk
275LocLVM_StartOfEntries equ 3ch ; (contains maximum of 4 entries)
276LocLVM_LenOfEntry equ 3ch ; Length of an LVM-entry
277
278; An LVM info-sector can contain information on max. 4 partitions.
279; All 4 entries will be used when there 4 primary partitions defined.
280; For logical partitions, the LVM info-sector is located below the start
281; of the logical partition and only one LVM entry is used in that logical
282; LVM info-sector.
283LocLVM_MaxEntries equ 4 ; Max entries in an LVM-sector
284
285
286; -----------------------------------------------------------------------------
287; LVM ENTRY
288; -----------------------------------------------------------------------------
289; Offsets for LVM entry.
290; These are relative to the start of the entry.
291LocLVM_VolumeID equ 00h ; DWORD
292LocLVM_PartitionID equ 04h ; DWORD
293LocLVM_PartitionSize equ 08h ; DWORD
294LocLVM_PartitionStart equ 0ch ; DWORD
295LocLVM_OnBootMenu equ 10h ; is on IBM BM Bootmenu
296LocLVM_Startable equ 11h ; is Startable (newly installed system)
297LocLVM_VolumeLetter equ 12h ; Drive Letter for partition (C-Z or 0)
298LocLVM_Unknown equ 13h ; unknown BYTE (can be used ?)
299LocLVM_InstallLetter equ 13h ; unknown BYTE (can be used ?)
300
301; Truncated to 11 chars when displayed in menu.
302; MiniLVM sets both to the same value.
303; Also, MiniLVM uses a 0-byte terminator, so the maximum length is 19d.
304; Same goes for LocLVM_DiskName.
305; These offsets are relative to an LVM entry.
306LocLVM_VolumeName equ 14h ; 20 bytes
307LocLVM_PartitionName equ 28h ; 20 bytes (Used in menu)
308
309; LVM constants.
310LocLVM_LabelLen equ 14h ; Length of LVM Label (Disk/Part/Vol)
311LocLVM_DiskNameLen equ 14h ; Length of LVM DiskName
312LocLVM_VolumeNameLen equ 14h ; Length of LVM VolumeName
313LocLVM_PartitionNameLen equ 14h ; Length of LVM PartitionName
314
315
316; -----------------------------------------------------------------------------
317; AiR-BOOT IPT
318; -----------------------------------------------------------------------------
319; Offsets for IPT (Internal Partition Table)
320LocIPT_MaxPartitions equ max_partitions ; 45 in v1.07+
321LocIPT_LenOfSizeElement equ 6 ; Size of one Size-Element
322LocIPT_LenOfIPT equ 34 ; Length of an IPT-entry
323LocIPT_Serial equ 0 ; Serial from MBR ?
324LocIPT_Name equ 4 ; Name from FS or LVM (part/vol)
325LocIPT_Drive equ 15 ; Drive-ID (80h,81h)
326LocIPT_SystemID equ 16 ; Partition-Type (06,07,etc)
327LocIPT_Flags equ 17 ; AiR-BOOT Flags for part (see below)
328LocIPT_BootRecordCRC equ 18 ; CRC of Boot-Record
329LocIPT_LocationBegin equ 20 ; Begin of Partition
330LocIPT_LocationPartTable equ 23 ; PartitionTable of Partition
331LocIPT_AbsoluteBegin equ 26 ; Absolute Sector of Begin
332LocIPT_AbsolutePartTable equ 30 ; Absolute Sector of PartTable
333
334
335; AiR-BOOT IPT-Flags
336LocIPT_DefaultFlags equ 00000011b ; Don't know if boot-able :)
337LocIPT_DefaultNonBootFlags equ 00000010b ; VIBR Detection is always on
338
339Flags_Bootable equ 00000001b
340Flags_VIBR_Detection equ 00000010b
341Flags_HideFeature equ 00000100b
342Flags_DriveLetter equ 00001000b ; OS/2 FAT16/HPFS only
343Flags_ExtPartMShack equ 00010000b ; Ext. Partition M$-Hack req ?
344Flags_NoPartName equ 01000000b
345Flags_NowFound equ 10000000b ; temp only in OldPartTable
346Flags_SpecialMarker equ 10000000b ; temp only for HiddenSetup
347
348FileSysFlags_BootAble equ 00000001b ; Is this Partition boot-able ?
349FileSysFlags_FAT32 equ 00010000b ; FAT 32 specific name getting
350FileSysFlags_NoName equ 00100000b ; No Name - use PartitionName
351FileSysFlags_DriveLetter equ 01000000b ; DriveLetter Feature possible
352
353
354; -----------------------------------------------------------------------------
355; AiR-BOOT HPT
356; -----------------------------------------------------------------------------
357; Hidden Partition Table
358; Length of an HPT-entry ((45 * 6 bits-per-part) / 8) * 45
359; 33.75 = 34 bytes for HPT-entry, coincidently same as length of IPT-entry.
360; Packed table !
361LocHPT_LenOfHPT equ 34
362
363
364; -----------------------------------------------------------------------------
365; NAVIGATION KEYS
366; -----------------------------------------------------------------------------
367; Navigation keys
368Keys_Up equ 48h
369Keys_Down equ 50h
370Keys_Left equ 4Bh
371Keys_Right equ 4Dh
372Keys_PageUp equ 49h
373Keys_PageDown equ 51h
374Keys_GrayPlus equ 4Eh
375Keys_GrayMinus equ 4Ah
376Keys_Plus equ 1Bh
377Keys_Minus equ 35h
378Keys_ENTER equ 1Ch
379Keys_ESC equ 1h
380Keys_F1 equ 3Bh
381Keys_F10 equ 44h
382Keys_C equ 2Eh ; Add. Check for Ctrl!
383Keys_Y equ 2Ch
384Keys_Z equ 15h
385Keys_N equ 31h
386Keys_TAB equ 0Fh
387Keys_Delete equ 53h
388Keys_Backspace equ 0Eh
389Keys_Space equ 20h
390
391Keys_Flags_EnterSetup equ 1100b ; Strg+Alt (AL)
392
393
394; -----------------------------------------------------------------------------
395; MISC
396; -----------------------------------------------------------------------------
397; Initial value for the FreeDriveletterMap
398; Meaning A,B not free; C-Z free, rest unused. (right to left)
399; Each partition with an assigned drive-letter clears a bit in this map.
400; (Not implemented yet)
401InitialFreeDriveletterMap equ 00000011111111111111111111111100b
402
403;
404; The first harddisk is BIOS coded 80h.
405; This makes a total of 128 disks that could be supported using this coding.
406; This value is used to store disk-information and this info is allocated
407; in the BSS. 64 disks ought to be enough for everybody :-)
408;
409MaxDisks equ 64
410
411
412
413
414
415
416;##############################################################################
417; AiR-BOOT / MAIN-CODE
418;##############################################################################
419
420;
421; Because of the TASM-bug the processor had to be changed to turn JUMPS
422; off. Existing movzx instructions were replaced with 286 equivalent code.
423; Out of range relative jumps have been recoded.
424;
425; Since version 1.0.8, JWasm is the preferred assembler and Tasm will be
426; dropped. Also, the chances of AiR-BOOT being used on a 286-machine are
427; very slim, so a future version will revert back to .386 and also incorporate
428; 32-bit code. This will enable some enhanced constructs such as scaled
429; indexing, bit-instructions, 32-bit registers and what not.
430;
431.286
432
433;
434; For Tasm, MODEL is needed for the USES directive to work.
435; So always use a model when assembling with Tasm otherwise registers on
436; function calls that use USES are not saved and restored.
437; The model itself, has no real effect because we generate a binary image
438; and not a segmented executable.
439; For the other assemblers we define no model to get rid of the default C/C++
440; segments for future object-linked versions of AiR-BOOT.
441;
442IFDEF TASM
443 ;~ .model large, basic
444 .model tiny,c
445ENDIF
446
447;
448; The below is used to switch between the original 1-segment (code_seg) layout
449; and the new 2-segment (code_seg and bss_data) layout.
450; It will be removed in future versions.
451; The 2-segment layout was needed for JWasm because it does not treat
452; db ? at the end of a code segment as bss-data.
453; Therefore, a true BSS segment is now used.
454; Both the code_seg and the bss_data are grouped to the logical AIRBOOT
455; segment.
456; Note that this influences the offsets in the BSS in the list-file and
457; the wdis disassembly file (.WDA).
458; They are now segment-relative. The true offset is resolved at link
459; time.
460;
461SEGMENTED EQU
462
463 IFDEF SEGMENTED
464 AIRBOOT GROUP LDRIMAGE,VOLATILE
465 ENDIF
466
467 ; Our code-segment starts here.
468 LDRIMAGE SEGMENT USE16 PUBLIC 'CODE'
469
470 IFDEF SEGMENTED
471 ASSUME CS:AIRBOOT, DS:AIRBOOT, ES:nothing, SS:nothing
472 ELSE
473 ASSUME CS:LDRIMAGE,DS:LDRIMAGE,ES:nothing, SS:nothing
474 ENDIF
475
476
477
478;==============================================================================
479; Sector 1
480;==============================================================================
481
482;------------------------------------------------------------------------------
483 ; We are not a .COM file at 100h but a BINARY image
484 ; of which only the 1st sector gets loaded at 0000:07c00h
485 ; by the BIOS. The code in this 1st sector is position
486 ; independent and moves itself to a new location at 8000:0000h.
487 ; Then it jumps to a new entry-point and loads the rest of
488 ; the image to the new location.
489 org 00000h
490;------------------------------------------------------------------------------
491
492
493;
494; Since AiR-BOOT is a boot-loader residing in track0, the first 512 bytes
495; have the layout of a Master Boot Record (MBR). When AiR-BOOT get's installed,
496; the first 512 bytes of this code get's merged with the Partition Table.
497; The rest is installed in the remaining sectors with sector 62 (LBA 61)
498; being the last sector used by AiR-BOOT. Sector 63 is reserved for IBM LVM.
499; The last sector used by AiR-BOOT is a copy of the MBR that AiR-BOOT makes
500; every time a system gets booted.
501;
502
503;
504; Due to the addition of an extra 'I13X' sugnature and code to preserve the
505; values of the registers on entry, the MBR-code has become a bit messy.
506; This will be cleaned-up in future versions.
507;
508
509;
510; Martin had a short jump followed by the AiRBOOT signature at first.
511; Then he encountered strange behaviour by some M$ operating-systems
512; if the the first insruction was not a CLI.
513; But there was no room to insert the CLI and of course he did not want to
514; change the location of the AiR-BOOT signature.
515; He solved this by inserting the M$ needed CLI at offset 0 followed by a short
516; jump that uses the 'A' of the AiR-BOOT signature as the jump displacement.
517;
518
519
520; -----------------------------------------------------------------------------
521; FIRST ENTRY-POINT
522; -----------------------------------------------------------------------------
523; BOOKMARK: FIRST ENTRY-POINT (Invoked by BIOS)
524; ######################################################
525; # ENTRY-POINT WHERE THE BIOS TRANSFERS CONTROL TO US #
526; ######################################################
527AiR_BOOT:
528 ; Some M$ operating systems need a CLI
529 ; here otherwise they will go beserk
530 ; and will do funny things during
531 ; boot phase, it's laughable!
532 MBR_1stOpc: cli
533
534 ; JMP-Short -> MBR_Start
535 ; Uses the 'A' from the signature as the displacement !
536 MBR_JmpOpc db 0EBh
537
538 ; ID String, Date (DD,MM,CC,YY), Version Number, Language ID
539 ;~ db 'AiRBOOT',24h,02h,20h,12h,01h,08h,TXT_LanguageID
540 MBR_ABSig: InsertAirbootSignature TXT_LanguageID
541
542 ; Total Code Sectors Count.
543 ; Actual value will be inserted by FIXCODE.
544 MBR_CodeSecs db 1
545
546 ; Total Code Sectors Count, dynamically calculated.
547 ;~ db (code_end-$)/512
548
549 ; Check-Sum for Code
550 MBR_CheckCode dw 0
551
552
553
554; -----------------------------------------------------------------------------
555; THIRD ENTRY-POINT
556; -----------------------------------------------------------------------------
557; BOOKMARK: THIRD ENTRY-POINT (Relocate code)
558;
559; No single instruction below should be changed, added or removed in the code
560; below as this will cause the jump-link to go haywire.
561;
562MBR_Start:
563 ;
564 ; When we arrive here, no registers have been used yet.
565 ; So, they still contain the values the BIOS left in them.
566 ; We want to preserve those value's for later inspection
567 ; by putting them on the stack.
568 ;
569
570 ; No space for this instruction here.
571 ; We'll enable interrupts later.
572 ;sti ; This opcode is dedicated to:
573 ; =MICROSOFT JUMP DEPARTMENT=
574
575 ; Push all registers with values provided by the BIOS
576 ; on the stack.
577 pusha
578
579 ;
580 ; Setup some base stuff
581 ; AX got loaded wrongly for debug, changed the instructions
582 ; without modifying the number of bytes.
583 ; Don't comment-out the redundant instruction below because it
584 ; *will* change the number of bytes and break the jump-chain.
585 ;
586
587 ; The segment we are moving ourself from (NOT USED)
588 ;mov ax, StartBaseSeg
589 ;mov ds, ax
590
591 ; Make sure DS points to CS.
592 push cs
593 pop ds
594
595 ; Setup the source and destination for the code move.
596 mov si, StartBasePtr ; The offset we move ourself from
597 mov ax, BootBaseSeg ; The target segment we move to
598 mov es, ax
599 ;mov di, BootBasePtr ; The target offset we move to
600 ; Changed the instruction to make room.
601 ; So, BootBasePtr is not used !
602 ; The offset in the target segment is assumed to be 0000
603 ; anyway.
604 xor di,di
605 ;sti
606
607 ; Size of the MBR in words.
608 mov cx, 256 ; Pre-boot environment
609
610 ;
611 ; This moves this 512-byte sector, loaded by the BIOS at
612 ; 0000:7c00 to 8000:0000.
613 ;
614 cld
615 rep movsw
616
617 ; Temporary save SS and SP so we still have access to this
618 ; stack after we have setup our own.
619 mov cx,ss
620 mov bx,sp
621
622 ; Code an intersegment jump to the new location.
623 ; jmp BootBaseSeg:BootBaseExec
624 ; Note that DX:BX containts the old SS:SP.
625 db 0EAh
626 dw BootBaseExec ; This is MBR_RealStart + BootBasePtr
627 dw BootBaseSeg ; This is 08000h
628
629
630
631
632; -----------------------------------------------------------------------------
633; SIMPLE MBR FUNCTIONS
634; -----------------------------------------------------------------------------
635;
636; Some MBR-functions to provide absolute minimum functionality.
637;
638
639;
640; BOOKMARK: Halt System
641; Entry-point for halting the system.
642;
643MBR_HaltSystem:
644 mov ax, 8600h
645 xor cx, cx
646 mov dx, 500
647 int 15h ; Wait to display the whole screen :]
648MBR_HaltSys:
649 ;~ cli
650 jmp MBR_HaltSys
651
652
653 ; Base of some MBR variables
654 ORIGIN 0003Ch
655
656MBR_Variables:
657
658; Comport settings.
659; It had to be moved to create room for the double I13X signature.
660; It cannot be in the config-area (sector 55)
661; because that area is crc-protected and would not allow 'poking'.
662BIOS_AuxParms dw BIOS_AUXPARMS_DEFAULT
663
664; When the BIOS turns over control to the MBR, DL holds the BIOS disk-number
665; from which the boot was initiated. This would normally be 80h, corresponding
666; to the first physical disk. However, some modern BIOSses can directly boot
667; from other disks, so AirBoot cannot assume being loaded from 80h anymore.
668; So here we store the BIOS disk-number passed in DL when AirBoot got control.
669BIOS_BootDisk db BIOS_BOOTDISK_DEFAULT ; Get overwritten with 'DL'
670
671; Reserved space for future variables.
672IFDEF AUX_DEBUG
673reserved db 5 dup('X')
674ELSE
675reserved db 5 dup(0)
676ENDIF
677
678
679
680
681; -----------------------------------------------------------------------------
682; SECOND ENTRY-POINT
683; -----------------------------------------------------------------------------
684
685 ;
686 ; We arrive here after the first jump using the 'A' of the
687 ; AiR-BOOT signature. So we ensure the jump is always at
688 ; this offset. We jump here, because Martin needed to
689 ; insert a CLI on start and did not want to change the
690 ; AiR-BOOT signature because of Microsoft inventions...
691 ;
692 ORIGIN 00044h
693
694 ; Jump again...
695 ; This time to the code that relocates to 8000:0000.
696 ; BOOKMARK: SECOND ENTRY_POINT (Skipped over AB signature)
697 jmp MBR_Start
698
699;
700; Entry-point when loading fails.
701;
702 db 'LOAD ERROR!', 0
703MBR_LoadError Proc Near
704 mov si, offset $-12
705 push cs
706 pop ds
707 call MBR_Teletype
708 MBRLE_Halt:
709 jmp MBRLE_Halt
710MBR_LoadError EndP
711
712;
713; Entry-point when saving fails.
714;
715 db 'SAVE ERROR!', 0
716MBR_SaveError Proc Near
717 mov si, offset $-12
718 push cs
719 pop ds
720 call MBR_Teletype
721 MBRSE_Halt:
722 jmp MBRSE_Halt
723MBR_SaveError EndP
724
725
726; Put text on the screen using the BIOS tele-type function.
727; No attributes like color are supported.
728; In: SI - Pointer to begin of string (EOS is 0)
729; Destroyed: SI
730MBR_Teletype Proc Near Uses ax bx cx
731 mov ah, 0Eh
732 mov bx, 7
733 MBRT_Loop:
734 lodsb
735 or al, al
736 jz MBRT_End
737 int 10h
738 jmp MBRT_Loop
739 MBRT_End:
740 ret
741MBR_Teletype EndP
742
743;
744; Rousseau: DO NOT ADD CODE TO THIS SECTION !
745;
746
747; In: BX - Base Check
748; DS:SI - Pointer to 512-byte-area to be included
749; Out: BX - Base Check Result
750; Destroyed: SI will get updated (+512)
751MBR_GetCheckOfSector Proc Near Uses ax cx
752 mov cx, 256
753 MBRGCOS_Loop:
754 lodsw
755 xor ax, 0BABEh
756 xor bx, ax
757 loop MBRGCOS_Loop
758 or bx, bx
759 jnz MBRGCOS_NoFixUp
760 mov bx, 1 ; dont allow 0, cause 0 == empty
761 MBRGCOS_NoFixUp:
762 ret
763MBR_GetCheckOfSector EndP
764
765
766
767
768
769
770; -----------------------------------------------------------------------------
771; ENTRY-POINT OF MOVED CODE
772; -----------------------------------------------------------------------------
773
774;
775; When we arrive here we are running at 8000:0000.
776; CX:BX contains the SS:SP of the old stack.
777;
778
779;
780; This is where the rest of AiR-BOOT gets loaded from track0.
781;
782; BOOKMARK: Running at relocated position (Load additional sectors)
783;------------------------------------------------------------------------------
784MBR_RealStart:
785 ;
786 ; Setup new stack and other segment registers.
787 ;
788 mov ax, StackSeg ; 07000h, below the moved code
789 mov ss, ax
790 mov sp, 7FFEh ; Even is better
791 push es ; ES holds segment where we moved to
792 pop ds ; Set DS=ES to Code Segment
793
794 ;
795 ; Push the old SS:SP which was saved in CX:BX on the new stack.
796 ;
797 push cx ; Old SS
798 push bx ; Old SP
799
800 ;
801 ; Store the BIOS disk-number AirBoot was loaded from.
802 ;
803 mov [BIOS_BootDisk], dl
804
805 ; Load the configuration-sectors from disk.
806 ; These are the main configuration sector and the various
807 ; tables that follow it upto but not including the MBR backup.
808 mov bx, offset Configuration ; Location in RAM
809 mov cx, 0037h ; Config sector is at 55d
810 mov al, (MBR_BackUpMBR - Configuration) / 200h
811 mov ah, 02h
812 ; DL is already loaded with BIOS disk-number
813 int 13h ; Call BIOS service
814 jnc MBR_ConfigCopy_NoError
815
816 ; Some error occured
817 MBR_ConfigCopy_LoadError:
818 jmp MBR_LoadError ; Will Abort BootUp
819
820 ; Load the code-sectors from disk.
821 ; [MBR_CodeSecs] is filled in by the FIXCODE helper that post
822 ; processes the AIRBOOT loader image after it has been built.
823 MBR_ConfigCopy_NoError:
824 mov bx, offset FurtherMoreLoad ; Directly after MBR
825 mov cx, 0002h ; Start at 2nd sector
826 mov al, [MBR_CodeSecs] ; Number of code sectors
827 mov ah, 02h ; Read sectors
828 ; DL is already loaded with BIOS disk-number
829 int 13h ; Call BIOS service
830 jnc MBR_RealStart_NoError
831
832 ; Some error occured
833 jmp MBR_LoadError ; Will Abort BootUp
834
835
836 ; I13X Signatures
837 ORIGIN 000d0h
838
839 ; [v1.05+]
840 ; Signature for IBM's LVM to detect our "powerful" features ;)
841 ;
842 ; [v1.0.8+]
843 ; Reworked MBR code to be able to create a
844 ; double 'I13X' signature.
845 ; MBR's created with LVM eCS v1.x have the signature at 0d5h
846 ; MBR's created with LVM eCS v2.x have the signature at 0d0h
847 ; See eCS bugtracker issue #3002
848 ;
849 ; Update: These are actually MOV EAX,'X31I' instructions
850 ; in the eCS LVM MBR-code. They are at different places in
851 ; the v1.x and v2.x LVM MBR-code. Other code might depend on
852 ; their presence. Let's protect their location.
853 db 'I13X',0,'I13X',0
854
855
856 MBR_RealStart_NoError:
857 ; Now Check Code with CheckSum
858 mov si, offset FurtherMoreLoad
859
860 ;movzx cx, bptr ds:[10h]
861 mov cl, ds:[10h]
862 mov ch,0
863
864 ; Claculate checksum
865 xor bx, bx
866 MBR_RealStart_CheckCodeLoop:
867 call MBR_GetCheckOfSector
868 loop MBR_RealStart_CheckCodeLoop
869
870 ; Verify checksum -- EQUAL if OK
871 cmp MBR_CheckCode, bx
872
873 ;
874 ; The CRC is calculated and inserted in the loader image when
875 ; AiR-BOOT is installed. Ignoring the CRC enables manually
876 ; merging the loader without using the installer. This is used
877 ; for debugging in virtual machines, where it is easy to
878 ; merge the loader to the disk image of the VM.
879 ;
880 IFDEF CRC_IGNORE
881 jmp MBR_RealStart_CheckSuccess ; Ignore CRC
882 ELSE
883 je MBR_RealStart_CheckSuccess ; Honor CRC -- EQ is OK
884 ENDIF
885
886 ;
887 ; Oops, checksum mismatch -- halt the system
888 ;
889 mov si, offset TXT_ERROR_Attention
890 call MBR_Teletype
891 mov si, offset TXT_ERROR_CheckCode
892 call MBR_Teletype
893 mov si, offset TXT_ERROR_CheckFailed
894 call MBR_Teletype
895 jmp MBR_HaltSystem
896
897
898 ;
899 ; OK, all loading went fine so the rest of the code
900 ; is present now, so we jump to it.
901 ; The old SS:SP is still on the stack.
902 ;
903 MBR_RealStart_CheckSuccess:
904 jmp AiR_BOOT_Start
905
906
907
908
909
910;------------------------------------------------------------------------------
911include_from text/%BLD_LANG,mbr.asm ; All translateable Text in MBR
912;------------------------------------------------------------------------------
913
914 ; Disk Signature
915 ORIGIN 001B8h
916
917
918 ; Disk Signature
919 ; Note that in an LVM 2.x MBR this collides
920 ; with the dummy PTE that it uses to look for IBM-BM
921 ; on the second harddisk.
922 ; AiR-BOOT installer will merge the field
923 ; from the MBR it replaces.
924 MBR_DrvSig db 'DSIG'
925
926 ; Unused word at 01BCh.
927 ; An LVM 2.x MBR puts 0CC33h here.
928 ; AiR-BOOT installer will merge the field
929 ; from the MBR it replaces.
930 MBR_Spare dw '$$'
931
932
933 ; Partition Table.
934 ORIGIN 001BEh
935
936 ; The 4 entries just for show.
937 ; AiR-BOOT installer will merge them from the MBR it replaces.
938 MBR_PartTable:
939 db 16 dup('0')
940 db 16 dup('1')
941 db 16 dup('2')
942 db 16 dup('3')
943
944 ; Boot Sigbature
945 MBR_Sig dw 0aa55h
946
947
948
949
950
951
952
953;==============================================================================
954; Sector 2
955;==============================================================================
956
957; -----------------------------------------------------------------------------
958; FILE-SYSTEM TABLES
959; -----------------------------------------------------------------------------
960
961 ; First sector the rest of the loader image
962 ORIGIN 00200h
963
964;
965; Everything beyond this point is loaded on startup
966; and is NOT existant at first
967;
968FurtherMoreLoad:
969
970;
971; Filesystem table correlating id with name.
972;
973
974 ; first Normal-Partition-ID, Hidden-Partition-ID
975 ; and Default-Partition-Flags.
976 ; 01h -> Boot-Able
977 ; 10h -> FAT32 - Name Getting Scheme
978 ; 20h -> No Name To Get (use Partition Name from IPT)
979 ; 40h -> 'L' flag possible
980 db 'AiRSYS-TABLE'
981FileSysIDs db 01h, 11h,01h, 04h,014h,01h, 06h,016h,41h, 0Eh,00Eh,01h
982 db 07h, 17h,41h, 08h,017h,21h, 35h,035h,20h,0FCh,017h,41h
983 db 09h, 19h,11h, 0Bh,01Bh,11h, 0Ch,01Ch,11h,0EBh,0EBh,01h
984 db 63h, 63h,21h, 81h,081h,21h, 83h,083h,21h, 40h,040h,21h
985 db 0A5h,0A5h,21h,0A6h,0A6h,21h, 82h,082h,20h,0A7h,0A7h,21h
986 db 63h, 63h,21h, 4Dh,04Dh,21h, 4Eh,04Eh,21h, 4Fh,04Fh,21h
987 db 01h, 01h,01h, 01h,001h,01h, 01h,001h,01h, 01h,001h,01h
988 db 01h, 01h,01h, 01h,001h,01h, 01h,001h,01h, 01h,001h,01h
989 db 01h, 01h,01h, 01h,001h,01h, 01h,001h,01h, 01h,001h,01h
990 db 01h, 01h,01h,0FDh,0FDh,20h, 84h,084h,20h,0A0h,0A0h,20h
991 db 0Ah, 0Ah,20h,0FEh,0FEh,21h,0FFh,0FFh,21h, 00h,000h,21h
992 db 16 dup (0)
993
994FileSysNames db 'FAT12 ', 'FAT16 ', 'FAT16Big', 'FAT16Big'
995 db 'HPFS ', 'NTFS ', 'LVM-Data', 'JFS '
996 db 'FAT32 ', 'FAT32 ', 'FAT32 ', 'BeOS '
997 db 'Unix ', 'Minix ', 'Linux ', 'Venix ' ; x row ;)
998 db 'BSD/386 ', 'OpenBSD ', 'LinuxSwp', 'NeXTSTEP'
999 db 'GNU HURD', 'QNX ', 'QNX ', 'QNX '
1000 db ' ', ' ', ' ', ' '
1001 db ' ', ' ', ' ', ' '
1002 db ' ', ' ', ' ', ' '
1003 db ' ', 'Kernel ', ' ', '0V-Award'
1004; db 'OS/2 Man', 'via BIOS', 'Floppy ', 'Unknown '
1005 db 'OS2-BMGR', 'via BIOS', 'Floppy ', 'Unknown '
1006 ; -> 44 Partition-Types
1007
1008
1009
1010
1011
1012
1013;==============================================================================
1014; Sector 3
1015;==============================================================================
1016
1017; -----------------------------------------------------------------------------
1018; ENTRY-POINT AFTER LOADING THE REST OF THE CODE
1019; -----------------------------------------------------------------------------
1020
1021 ; The entry-point jumped to from the MBR code
1022 ORIGIN 00400h
1023
1024
1025;##############################################################################
1026;# AiR_BOOT_Start :: This is where the real work begins #
1027;# -------------------------------------------------------------------------- #
1028;# At this point, all of AirBoot is loaded, including its configuration. #
1029;# First, some setup is done, which includes the initialization of variables #
1030;# in the BSS. After that, disks are scanned for partitions and the required #
1031;# house keeping is done to incorporate changes from the previous boot. Then #
1032;# the partition list is prepared and the menu is presented. #
1033;##############################################################################
1034; BOOKMARK: AiR_BOOT_Start (AiR-BOOT now completely loaded)
1035AiR_BOOT_Start:
1036
1037
1038 ;
1039 ; Enable interrupts.
1040 ;
1041 sti
1042
1043 ;
1044 ; Pop the old SS:SP from the stack and save it in the BSS.
1045 ; Note that this is outside the normal variable area that gets cleared.
1046 ; This allows AiR-BOOT to restart itself when debugging and come-up
1047 ; with access to the original values of registers the BIOS passed.
1048 ;
1049 pop [OldSP]
1050 pop [OldSS]
1051
1052 ; Clear the BSS from its real start just upto the end of the variables.
1053 ; Here 'real start' means from where the BSS begins, which is below
1054 ; the point where the first variables are located. The part after
1055 ; the variables is not cleared because that is where the old SS:SP is
1056 ; stored, which is needed for AirBoot restarts during debugging.
1057 mov bx, offset sobss
1058 mov cx, offset EndOfVariables - offset sobss
1059 xor ax, ax
1060 call FillMemBlock
1061
1062; Initialize the com-port for debugging
1063IFDEF AUX_DEBUG
1064 PUSHRF
1065 ; Init com-port
1066 call AuxIO_Init
1067 ; Hello message
1068 mov si, offset [AuxIOHello]
1069 call AuxIO_Print
1070 ; Show Build Info
1071 call AuxIO_PrintBuildInfo
1072 call AuxIO_TeletypeNL
1073 POPRF
1074ENDIF
1075
1076; Dump debug information
1077IFDEF AUX_DEBUG
1078 IF 1
1079 call DEBUG_Dump1
1080 ENDIF
1081ENDIF
1082
1083; Verify we still got the BIOS disk in DL
1084IFDEF AUX_DEBUG
1085 IF 1
1086 DBG_TEXT_OUT_AUX '## AiR_BOOT_Start ##'
1087 PUSHRF
1088 call DEBUG_DumpRegisters
1089 POPRF
1090 ENDIF
1091ENDIF
1092
1093
1094; -----------------------------------------------------------------------------
1095; IBM-BM BOOT PREPARATION
1096; -----------------------------------------------------------------------------
1097 ;
1098 ; Since v1.0.8, AiR-BOOT is able to chainload IBM-BM.
1099 ; When IBM-BM resides above the 1024-cylinder limit, the 'I13X'
1100 ; signature is required at 3000:0000, FS needs to contain 3000h
1101 ; and the 32-bit LBA address needs to follow the 'I13X' signature.
1102 ; For booting IBM-BM from the second disk, a copy of the MBR of the
1103 ; first disk is also required at 0000:7E00.
1104 ; This information is derived from the eCS 2.x LVM MBR.
1105 ;
1106 ; So, now is a good time to copy the MBR of the first disk to
1107 ; 0000:7E00 in case the partition that will be started is IBM-BM.
1108 ; This copy is located at 8000:0000 and DS already points to this
1109 ; segment. The 'I13X' signature and FS will be setup later.
1110 ;
1111 pusha ; Save all the general purpose regs
1112 push es ; We need ES too, so save its value
1113 xor ax,ax ; Segment 0000h
1114 mov es,ax ; Make ES point to it
1115 mov si,offset BootBasePtr ; Start of AiR-BOOT which has the MBR
1116 mov di,7e00h ; Destination for the MBR for IBM-BM
1117 mov cx,100h ; 256 words = 512 bytes
1118 cld ; Direction from low to high
1119 rep movsw ; Copy the 256 words of the MBR
1120 pop es ; Restore previous value of ES
1121 popa ; Restore all the general purpose regs
1122
1123
1124; -----------------------------------------------------------------------------
1125; PRECRAP
1126; -----------------------------------------------------------------------------
1127
1128 ;
1129 ; First it clears the BSS area.
1130 ; Note that the old SS:SP is stored outside this area so this
1131 ; does not get lost.
1132 ; Then initialize various runtime variables and structures.
1133 ;
1134 ; BOOKMARK: Pre Crap
1135 call PRECRAP_Main
1136 ; Number of harddisks and other system-info is now known.
1137
1138;!
1139;! DEBUG_BLOCK
1140;! Let's see what the BIOS supplied us with...
1141;! Uncomment below to activate.
1142;!
1143IFDEF AUX_DEBUG
1144 IF 0
1145 pushf
1146 pusha
1147
1148 ; Print title.
1149 mov si,offset [bios_reg]
1150 call AuxIO_Print
1151 ; Save the current stack (SS:SP).
1152 mov ax,ss
1153 mov [CurrentSS],ax
1154 mov [CurrentSP],sp
1155
1156 ; Restore the old stack.
1157 mov ss,[OldSS]
1158 mov sp,[OldSP]
1159
1160 ; Pop the registers with the BIOS values.
1161 popa
1162 ; Push them back for AiR-BOOT restart (debug mode).
1163 pusha
1164 ; Dump them to the serial-port.
1165 call DEBUG_DumpRegisters
1166 ; Restore the current stack.
1167 mov ax,[CurrentSS]
1168 mov ss,ax
1169 mov sp,[CurrentSP]
1170
1171 popa
1172 popf
1173 ENDIF
1174ENDIF
1175
1176
1177
1178; -----------------------------------------------------------------------------
1179; UPDATE MBR
1180; -----------------------------------------------------------------------------
1181
1182 ; Write MBR back to disk to sync MBR variables.
1183 ; Otherwise subsequent MBR loads will differ from the RAM stored one,
1184 ; which is used by MBR protection to validate parts of the MBR.
1185 xor bx, bx ; 0000h - our load address (8000:0000)
1186 mov cx, 1 ; CHS sector 1, cylinder 0
1187 xor dh, dh ; CHS head 0
1188 mov dl, [BIOS_BootDisk] ; The disk we were loaded from
1189 mov al, 1 ; One sector to write
1190 mov ah, 03h ; BIOS write disk (legacy)
1191 int 13h ; Call BIOS
1192 sti ; Enable ints
1193 ;!
1194 ;! TODO: Check success
1195 ;! Yes, we should check for errors here, coz it would mean AirBoot
1196 ;! was loaded from a disk where the MBR cannot be written !
1197 ;!
1198
1199
1200
1201; -----------------------------------------------------------------------------
1202; SCAN DISKS
1203; -----------------------------------------------------------------------------
1204
1205;!
1206;! DEBUG_BLOCK
1207;! Dump the registers at this point.
1208;!
1209IFDEF AUX_DEBUG
1210 IF 0
1211 PUSHRF
1212 call DEBUG_DumpRegisters
1213 ;~ call DEBUG_DumpDriveLetters
1214 ;~ call DEBUG_DumpVolumeLetters
1215 ;~ call DEBUG_DumpPartitionXref
1216 POPRF
1217 ENDIF
1218ENDIF
1219
1220
1221 ;
1222 ; Scan disks for information like size etc.
1223 ;
1224 call DriveIO_ScanDisks
1225
1226;!
1227;! DEBUG_BLOCK
1228;! Dump the registers at this point.
1229;!
1230IFDEF AUX_DEBUG
1231 IF 0
1232 PUSHRF
1233 call DEBUG_DumpRegisters
1234 ;~ call DEBUG_DumpDriveLetters
1235 ;~ call DEBUG_DumpVolumeLetters
1236 ;~ call DEBUG_DumpPartitionXref
1237 POPRF
1238 ENDIF
1239ENDIF
1240
1241
1242; -----------------------------------------------------------------------------
1243; SCAN FOR PARTITIONS
1244; -----------------------------------------------------------------------------
1245
1246 ;
1247 ; Scan disks for partitions
1248 ;
1249 call PARTSCAN_ScanForPartitions
1250
1251 ;
1252 ; Internal Partition Table is now populated.
1253 ;
1254
1255;!
1256;! DEBUG_BLOCK
1257;! Dump various tables.
1258;!
1259IFDEF AUX_DEBUG
1260 IF 0
1261 PUSHRF
1262 ;~ call DEBUG_DumpIPT
1263 ;~ call DEBUG_DumpPartitionPointers
1264 ;~ call DEBUG_DumpNewPartTable
1265 ;~ call DEBUG_DumpDriveLetters
1266 ;~ call DEBUG_DumpDriveLetters
1267 ;~ call DEBUG_DumpVolumeLetters
1268 ;~ call DEBUG_DumpPartitionXref
1269 POPRF
1270 ENDIF
1271ENDIF
1272
1273
1274; -----------------------------------------------------------------------------
1275; RESTORE FORCED DRIVELETTER CORRELATION [LVM]
1276; -----------------------------------------------------------------------------
1277
1278 ;
1279 ; Reconnect forced drive-letters to their corresponding
1280 ; partitions.
1281 ;
1282 ; BOOKMARK: Update Driveletters so they are in-sync again
1283 call PARTSCAN_UpdateDriveLetters
1284 ; Driveletter <-> Partition correlation is now restored.
1285
1286
1287
1288;!
1289;! DEBUG_BLOCK
1290;! Dump various tables.
1291;!
1292IFDEF AUX_DEBUG
1293 IF 0
1294 PUSHRF
1295 ;~ call DEBUG_DumpIPT
1296 ;~ call DEBUG_DumpPartitionPointers
1297 ;~ call DEBUG_DumpNewPartTable
1298 ;~ call DEBUG_DumpDriveLetters
1299 ;~ call DEBUG_DumpDriveLetters
1300 ;~ call DEBUG_DumpVolumeLetters
1301 ;~ call DEBUG_DumpPartitionXref
1302 POPRF
1303 ENDIF
1304ENDIF
1305
1306
1307; -----------------------------------------------------------------------------
1308; SHOW WE ARE ALIVE
1309; -----------------------------------------------------------------------------
1310
1311 ;
1312 ; Put some info about AiR-BOOT and the system on the screen.
1313 ;
1314
1315 ; Display number of physical disks found
1316 IFNDEF AUX_DEBUG
1317 mov [TextPosY], 3
1318 ELSE
1319 mov [TextPosY], 4
1320 ENDIF
1321 mov [TextPosX], 0
1322 mov si, offset [DisksFound]
1323 call VideoIO_Print
1324 mov al, [TotalHarddiscs]
1325 mov [TextColorFore], 0fh
1326 call VideoIO_PrintByteDynamicNumber
1327 mov [TextColorFore], 07h
1328
1329 ; Display number of partitions found
1330 inc [TextPosY]
1331 mov [TextPosX], 0
1332 mov si, offset [PartitionsFound]
1333 call VideoIO_Print
1334 mov al, [CFG_Partitions]
1335 call VideoIO_PrintByteDynamicNumber
1336
1337 ; Display Phase 1 Indicator
1338 inc [TextPosY]
1339 mov [TextPosX], 0
1340 mov si, offset [Phase1]
1341 call VideoIO_Print
1342 mov si, offset [OS2_InstallVolume]
1343 mov al, [si]
1344 test al,al ; See if phase 1 is active
1345 jnz @F
1346 mov si, offset [No]
1347 @@:
1348 call VideoIO_Print
1349
1350 ; Display information about the disks found
1351 call VideoIO_DisplayDiskInfo
1352
1353
1354
1355; -----------------------------------------------------------------------------
1356; OS/2 PHASE1 CHECK
1357; -----------------------------------------------------------------------------
1358
1359 ;
1360 ; BOOKMARK: Check for OS/2 being installed
1361 ; Here we check if OS/2 is being installed.
1362 ; If so, we forgo the menu and directly boot it.
1363 ;
1364
1365 ; If the first byte of the name of the Install Volume is not 0
1366 ; then we potentially have a phase1 boot.
1367 test byte ptr [OS2_InstallVolume],0ffh
1368 ; Nope, so continue normally.
1369 jz MBR_Main_ContinueBoot
1370
1371 ; Setup phase1.
1372 ; It is still possible that a name was set for the
1373 ; Install Volume that does not exist.
1374 ; In that case CY will be clear and AL=0FFh.
1375 call PART_SetupPhase1
1376 ; Oops, Install Volume not found, continue normally.
1377 jnc MBR_Main_ContinueBoot
1378
1379
1380 ;
1381 ; == Install Volume Found ==
1382 ;
1383
1384
1385;!
1386;! DEBUG_BLOCK
1387;! Dump various tables.
1388;!
1389IFDEF AUX_DEBUG
1390 IF 0
1391 PUSHRF
1392 ;~ call DEBUG_DumpIPT
1393 ;~ call DEBUG_DumpPartitionPointers
1394 ;~ call DEBUG_DumpPartitionXref
1395 ;~ call DEBUG_DumpNewPartTable
1396 ;~ call DEBUG_DumpDriveLetters
1397 POPRF
1398 ENDIF
1399ENDIF
1400
1401
1402 ; BOOKMARK: Scan for Partitions (Only if OS/2 install going on)
1403 ; Because one or more partitions are possibly added, the
1404 ; PartitionXref table is not 'in sync' and could cause the
1405 ; wrong system to be automatically booted.
1406 ; So we rescan all partitions causing the PartitionXref
1407 ; table to be filled with correct values so the auto-boot
1408 ; from the new partition will work correctly.
1409 call PARTSCAN_ScanForPartitions
1410
1411
1412;!
1413;! DEBUG_BLOCK
1414;! Dump various tables.
1415;!
1416IFDEF AUX_DEBUG
1417 IF 0
1418 PUSHRF
1419 ;~ call DEBUG_DumpIPT
1420 ;~ call DEBUG_DumpPartitionPointers
1421 ;~ call DEBUG_DumpPartitionXref
1422 ;~ call DEBUG_DumpNewPartTable
1423 ;~ call DEBUG_DumpDriveLetters
1424 POPRF
1425 ENDIF
1426ENDIF
1427
1428 ; Setup automatic boot to forgo the Menu.
1429 ; PART_SetupPhase1 has filled in the other variables.
1430 mov byte ptr [CFG_AutomaticBoot],1
1431
1432 ;
1433 ; At this point the AiR-BOOT configuration has been altered
1434 ; to automatically boot the newly installed system without
1435 ; displaying the menu.
1436 ; Code further down the road will take care of that.
1437 ;
1438 jmp MBR_Main_ContinueBoot
1439
1440
1441
1442
1443 ;
1444 ; Wether a new system is being installed or not,
1445 ; booting continues here.
1446 ;
1447 MBR_Main_ContinueBoot:
1448
1449 ;
1450 ; Inform user how to switch between post-screen and menu
1451 ; by putting this info on the screen.
1452 ;
1453 mov [TextPosY], 23
1454 mov [TextPosX], 0
1455 mov si, offset [TABMessage]
1456 call VideoIO_Print
1457 inc [TextPosY]
1458 mov [TextPosX], 57
1459 call MBR_TeletypeSyncPos
1460 mov si, offset [PREPMessage]
1461 call MBR_TeletypeBold
1462 mov al,30
1463 call TIMER_WaitTicCount
1464 mov cl, sizeof [PREPMessage]
1465 mov al, ' '
1466 call VideoIO_PrintSingleMultiChar
1467
1468 mov [TextPosX], 25
1469 mov si, offset [BootEndMsg2]
1470 add si, 39
1471 mov [TextColorFore], 08h
1472 call VideoIO_Print
1473
1474
1475 ;
1476 ; Debug stop.
1477 ;
1478
1479 ;
1480 ; ####################### WAIT FOR KEY ########################
1481 ;
1482
1483 ; Wait for key so we can see debug log if ab-menu hangs.
1484 ;~ xor ax, ax
1485 ;~ int 16h
1486 ;call SOUND_Beep
1487
1488
1489 ; Copy BIOS POST to Second Page
1490 mov ax, VideoIO_Page1
1491 call VideoIO_BackUpTo
1492
1493 ;call SOUND_Beep
1494
1495
1496 ; BOOKMARK: Save Configuration
1497 ; Save configuration so phase1 boot-through is disabled
1498 ; on next boot.
1499 mov byte ptr [OS2_InstallVolume], 0
1500 call DriveIO_SaveConfiguration
1501
1502
1503
1504 ;
1505 ; See if setup needs to be entered.
1506 ;
1507 MBR_Main_ReEnterSetup:
1508 call SETUP_CheckEnterSETUP
1509
1510 ;
1511 ; Do some post processing.
1512 ;
1513 ; BOOKMARK: After Crap
1514 call AFTERCRAP_Main
1515
1516 MBR_Main_ReEnterBootMenuPre:
1517 ; SetUp PartitionPointers for BootMenu (filter non-bootable)
1518 call PART_CalculateMenuPartPointers
1519
1520 ; ...and count that one...
1521 cmp byte ptr [PartitionPointerCount], 0
1522 jne MBR_Main_SomethingBootAble
1523 mov si, offset TXT_NoBootAble
1524 call MBR_Teletype
1525 jmp MBR_HaltSystem
1526
1527 MBR_Main_SomethingBootAble:
1528 ; FixUp Values, define Timed Setup booting, etc.
1529 call PART_FixUpDefaultPartitionValues
1530
1531
1532
1533 ; -------------------------------------------------- BOOT-MENU
1534 MBR_Main_ReEnterBootMenu:
1535 call BOOTMENU_ResetMenuVars ; reset has to be done
1536 test byte ptr [CFG_AutomaticBoot], 1
1537 jz MBR_Main_NoAutomaticBooting
1538
1539
1540 ; ------------------------------------------ AUTOMATIC BOOTING
1541 ; Select automatic partition, disable automatic booting for
1542 ; next time and boot system...
1543 mov byte ptr [CFG_AutomaticBoot], 0
1544 call PASSWORD_AskSystemPwd
1545 mov al, Menu_EntryAutomatic
1546
1547 ;mov al, 2
1548
1549 mov Menu_EntrySelected, al ; zero based
1550 jmp MBR_Main_NoBootMenu
1551
1552
1553 MBR_Main_NoAutomaticBooting:
1554
1555 ;call SOUND_Beep
1556
1557 test byte ptr [CFG_BootMenuActive], 0FFh
1558 jnz MBR_Main_GotBootMenu
1559 ; ----------------------------------------------- NO BOOT-MENU
1560 ; Select default partition and boot system...
1561 call PASSWORD_AskSystemPwd
1562
1563 mov al, Menu_EntryDefault
1564 ;mov al,0 ; zero based
1565 mov Menu_EntrySelected, al
1566 jmp MBR_Main_NoBootMenu
1567
1568 MBR_Main_GotBootMenu:
1569 ; ------------------------------------------ BOOT-MENU VISUALS
1570
1571
1572 IFDEF FX_ENABLED
1573 call FX_StartScreen
1574 ENDIF
1575
1576 ; BOOKMARK: Build Main Menu
1577 call BOOTMENU_BuildBackground
1578 call BOOTMENU_BuildMain
1579
1580 IFDEF FX_ENABLED
1581 call FX_EndScreenRight
1582 ENDIF
1583
1584 call PASSWORD_AskSystemPwd
1585 call BOOTMENU_ResetTimedBoot
1586
1587 ; BOOKMARK: Display Main Menu
1588 call BOOTMENU_Execute
1589
1590 jc MBR_Main_ReEnterSetup
1591 call BOOTMENU_SetVarsAfterMenu
1592
1593 ; ---------------------------------------------------- BOOTING
1594 MBR_Main_NoBootMenu:
1595
1596 IFDEF FX_ENABLED
1597 call FX_StartScreen
1598 ENDIF
1599
1600IFDEF AUX_DEBUG
1601 IF 0
1602 DBG_TEXT_OUT_AUX 'HALTING'
1603 PUSHRF
1604 ;~ call DEBUG_DumpRegisters
1605 ;~ call AuxIO_DumpParagraph
1606 ;~ call AuxIO_TeletypeNL
1607 @@: jmp @B
1608 POPRF
1609 ENDIF
1610ENDIF
1611 ; BOOKMARK: Display bye-screen and start selected partition
1612 call BOOTMENU_BuildGoodBye
1613
1614 IFDEF FX_ENABLED
1615 call FX_EndScreenRight
1616 ENDIF
1617
1618 call PASSWORD_AskChangeBootPwd
1619
1620 call ANTIVIR_SaveBackUpMBR
1621
1622 ; Preload the selected menu-entry
1623 ; However, this value will be wrong if OS/2 phase1 is
1624 ; active and the installation partition is newly created.
1625 ; See below for the adjustment.
1626 mov dl, byte ptr [Menu_EntrySelected]
1627
1628
1629 ;
1630 ; Prepare to start the partition.
1631 ;
1632 jmp MBR_Main_StartPartition
1633
1634
1635
1636; -----------------------------------------------------------------------------
1637; START PARTITION
1638; -----------------------------------------------------------------------------
1639
1640 MBR_Main_StartPartition:
1641
1642IFDEF AUX_DEBUG
1643 IF 0
1644 PUSHRF
1645 ;~ call DEBUG_DumpIPT
1646 ;~ call DEBUG_DumpPartitionPointers
1647 ;~ call DEBUG_DumpPartitionXref
1648 ;~ call DEBUG_DumpNewPartTable
1649 POPRF
1650 ENDIF
1651ENDIF
1652
1653
1654 ; -------------------------------------------- START PARTITION
1655 ; THIS DOES NOT RETURN !
1656 call PART_StartPartition
1657
1658
1659
1660
1661;
1662; This entry-point restarts AiR-BOOT almost from scratch.
1663; It skips the movement of the MBR but otherwise it is a functional restart.
1664; The old BIOS SS:SP where the registers on entry are stored is passed along.
1665; This entry-point is used for debugging purposes.
1666;
1667; BOOKMARK: AiR-BOOT Restart (used for debugging)
1668AirbootRestart:
1669 mov bx, [OldSP] ; Old SP when BIOS transferred control to AB
1670 mov cx, [OldSS] ; Old SS when BIOS transferred control to AB
1671 xor dh, dh ; Head 0
1672 mov dl, [BIOS_BootDisk] ; Disk AirBoot was loaded from
1673 jmp MBR_RealStart
1674
1675
1676;
1677; This entry-point displays a popup that the system is halted
1678; and then halts the system.
1679; It is entered on severe error conditions.
1680;
1681; BOOKMARK: Halt System
1682HaltSystem:
1683 call VideoIO_ClearScreen
1684 mov ax,0ababh
1685 mov cx, 0C04h
1686 mov si, offset SystemHalted
1687 call SETUP_ShowErrorBox
1688 ; Halt the system.
1689 jmp MBR_HaltSystem
1690
1691
1692
1693
1694
1695
1696 ;
1697 ; The following section includes various assembler modules
1698 ; at the source level. These contain functionality for a
1699 ; multitude of categories like disk-access, video-io, lvm,
1700 ; debugging, etc. Later versions of AiR-BOOT will use such
1701 ; modules at the object-file level so they can be shared
1702 ; more easily.
1703 ;
1704
1705
1706; -----------------------------------------------------------------------------
1707; INCLUDED FILE SECTION
1708; -----------------------------------------------------------------------------
1709
1710; BOOKMARK: Include Section
1711
1712;
1713; Include other code-modules here.
1714;
1715
1716b_std_txt:
1717include regular/std_text.asm ; Standard (non-translateable text)
1718size_std_txt = $-b_std_txt
1719
1720b_driveio:
1721include regular/driveio.asm ; Drive I/O, Config Load/Save
1722size_driveio = $-b_driveio
1723
1724b_lvm:
1725include special/lvm.asm ; LVM-specific code
1726size_lvm = $-b_lvm
1727
1728b_videoio:
1729include regular/videoio.asm ; Video I/O
1730size_videoio = $-b_videoio
1731
1732b_timer:
1733include regular/timer.asm ; Timer
1734size_timer = $-b_timer
1735
1736b_partmain:
1737include regular/partmain.asm ; Regular Partition Routines
1738size_partmain = $-b_partmain
1739
1740b_partscan:
1741include regular/partscan.asm ; Partition Scanning
1742size_partscan = $-b_partscan
1743
1744b_bootmenu:
1745include regular/bootmenu.asm ; Boot-Menu
1746size_bootmenu = $-b_bootmenu
1747
1748b_password:
1749include regular/password.asm ; Password related
1750size_password = $-b_password
1751
1752b_other:
1753include regular/other.asm ; Other Routines
1754size_other = $-b_other
1755
1756b_main:
1757include setup/main.asm ; The whole AiR-BOOT SETUP
1758size_main = $-b_main
1759
1760b_math:
1761include regular/math.asm ; Math functions (like 32-bit multiply)
1762size_math = $-b_math
1763
1764b_txtother:
1765include_from text/%BLD_LANG,other.asm ; All translateable Text-Strings
1766size_txtother = $-b_txtother
1767
1768b_txtmenus:
1769include_from text/%BLD_LANG,menus.asm ; All translateable Menu-text
1770size_txtmenus = $-b_txtmenus
1771
1772b_charset:
1773include text/charset.asm ; Special Video Charsets (if needed)
1774size_charset = $-b_charset
1775
1776b_conv:
1777include regular/conv.asm ; Various conversion routines
1778size_conv = $-b_conv
1779
1780b_virus:
1781include special/virus.asm ; Virus Detection / Anti-Virus
1782size_virus = $-b_virus
1783
1784b_billsuxx:
1785include special/f00k/billsuxx.asm ; Extended Partition - Microsoft-Hack
1786size_billsuxx = $-b_billsuxx
1787
1788b_sound:
1789include special/sound.asm ; Sound
1790size_sound = $-b_sound
1791
1792b_apm:
1793include special/apm.asm ; Power Managment Support
1794size_apm = $-b_apm
1795
1796
1797
1798;
1799; Extended Charset support.
1800;
1801IFDEF TXT_LoadCharset
1802b_ccharset:
1803 include special/charset.asm ; Charset Support (RU and ES)
1804size_ccharset = $-b_ccharset
1805ENDIF
1806
1807; Various debugging routines, uses AUXIO and CONV
1808IFDEF AUX_DEBUG
1809b_debug:
1810include regular/debug.asm ; Debug module
1811size_debug = $-b_debug
1812b_auxio:
1813include regular/auxio.asm ; Com-port support for debugging
1814size_auxio = $-b_auxio
1815ENDIF
1816
1817;
1818; We only include this if FX_ENABLED is defined.
1819; FX is disabled when debugging to have more room for debug-code.
1820; The module compiles to 50eh = 1294 bytes, so that is a lot.
1821;
1822IFDEF FX_ENABLED
1823b_fx:
1824include special/fx.asm ; l33t Cooper-Bars/Scrolling <bg>
1825size_fx = $-b_fx
1826ENDIF
1827
1828
1829 ;
1830 ; End of code marker.
1831 ;
1832 ; BOOKMARK: END OF CODE
1833 db 'BABE'
1834 db 'FACE'
1835
1836
1837; -----------------------------------------------------------------------------
1838; END OF CODE
1839; -----------------------------------------------------------------------------
1840code_end:
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851; -----------------------------------------------------------------------------
1852; BLDLEVEL INFORMATION
1853; -----------------------------------------------------------------------------
1854
1855 ; BOOKMARK: BLDLEVEL Information
1856 ORIGIN 068A0h
1857
1858;
1859; The space between this offset and code_end is the space
1860; available for code.
1861;
1862zzz_code_space = $ - code_end
1863
1864
1865bld_level:
1866 ;
1867 ; Here we insert the OS/2 BLDLEVEL Information.
1868 ; It is composed of the AiR-BOOT version-info and other
1869 ; information. It is unique for each release of AiR-BOOT.
1870 ;
1871
1872 ;
1873 ; ?? When AUX_DEBUG is enabled and the above org is active,
1874 ; the BLDLEVEL gets corrupted eventhough it gets inserted here
1875 ; explicitly. The effect is almost like an 'OR' or a merge
1876 ; with the already generated FX code.
1877 ; Tasm and JWasm produce different results.
1878 ; ??
1879 ;
1880 InsertBuildLevel
1881
1882
1883
1884
1885
1886;==============================================================================
1887; Sector 53
1888;==============================================================================
1889
1890 ;
1891 ; From here on, the layout of the image consists of:
1892 ; - AiR-BOOT Protection Image
1893 ; - AiR-BOOT Configuration
1894 ; - DriveLetters
1895 ; - Install Volume
1896 ; - Floppy/CDROM/BIOS BOOT ENTRIES
1897 ; - Internal Partition Table (IPT)
1898 ; - Hidden Partition Table (HPT)
1899 ; - MBR Backup
1900 ;
1901
1902 ;
1903 ; After that, the BSS follows with several runtime
1904 ; variables and structures.
1905 ; The BSS is not part of the image on disk of course.
1906 ;
1907
1908; -----------------------------------------------------------------------------
1909; PROTECTION IMAGE
1910; -----------------------------------------------------------------------------
1911
1912 ;
1913 ; This is the AiR-BOOT MBR Protection Image.
1914 ; The stuff generated here gets overwritten when the
1915 ; MBR_PROT module, which is assembled separately,
1916 ; gets binary merged.
1917 ; So you won't find the string below in the generated binary.
1918 ;
1919 ; BOOKMARK: AiR-BOOT MBR Protection Image
1920 ORIGIN 06900h
1921
1922
1923
1924
1925;
1926; Hardcoded to 768 bytes (MBR_PROT.ASM)
1927; The string below is searched for by the FIXCODE helper and *must* be
1928; page (256 bytes) aligned.
1929;
1930; It seems to be possible to shrink the protection-image to 768 bytes.
1931; That gives us an additional 256 bytes of code-space.
1932; MBR-PROT.ASM,FIXCODE.C,PARTMAIN.ASM and AIR-BOOT.ASM need to be adjusted for that.
1933; Also the granularity needs to change from 512 bytes to 256 bytes since
1934; 6900h is not a 512-byte boundary.
1935;
1936; 20120908 - Done.
1937;
1938MBR_Protection db 'AiR-BOOT MBR-Protection Image'
1939
1940 ; Just fill.
1941 ;~ db 1024-($-MBR_Protection) dup('M')
1942 db 768-($-MBR_Protection) dup('M')
1943
1944
1945
1946
1947
1948
1949
1950;==============================================================================
1951; Sector 55
1952;==============================================================================
1953; -----------------------------------------------------------------------------
1954; AiR-BOOT CONFIGURATION
1955; -----------------------------------------------------------------------------
1956
1957 ;
1958 ; This section contains the AiR-BOOT configuration.
1959 ; Note that it has a version that should be updated
1960 ; when stuff is added.
1961 ; Also add stuff to the end so that offsets of other
1962 ; variables remain vaild.
1963 ;
1964 ; BOOKMARK: AiR-BOOT Configuration Sector
1965 ORIGIN 06C00h
1966
1967Configuration:
1968 ; This is the signature for the AiR-BOOT Configuration.
1969 ; Note that this configuration section, like the code section,
1970 ; is CRC protected. This means that poking values in these
1971 ; sections on the disk will invalidate AiR-BOOT and cause it
1972 ; to halt. This is a protection method against other software
1973 ; modifying stuff in track 0.
1974 db 'AiRCFG-TABLE',0adh
1975 db 01h, 10h, 'U' ; "Compressed" ID String
1976 ; Version 1.02 was for code 1.06, 1.03 was internal
1977 ; and 1.04,1.05 and 1.06 do not exist.
1978 ;
1979 ; 1.07 was used with AB v1.07 and introduced the phase1
1980 ; system-name. For the rest it is compatible with v1.02.
1981 ;
1982 ; 1.0.8 is introduced with AB v1.0.8 and indicates the movement
1983 ; of several components and the packing of the hideparttable.
1984 ; The core configuration has not changed but the generated
1985 ; configuration has. The v1.0.8 installer handles upgrading.
1986 ;
1987 ; It has been decided that uneven minor numbers will be
1988 ; test-versions. Therefore v1.0.8 has been bumbed to v1.1.0.
1989 ;
1990 ; It is not required for the config to have the
1991 ; same version as the code, so in the future
1992 ; the code version might be higher than the
1993 ; config version if there are no changes to the latter.
1994 ;
1995
1996CFG_LastTimeEditLow dw 0 ; Last Time Edited Stamp (will incr every setup)
1997CFG_LastTimeEditHi dw 0 ; second 16 bit part...
1998
1999CFG_CheckConfig dw 0 ; Check-Sum for Configuration
2000
2001CFG_Partitions db 0 ; Count of partitions in IPT
2002CFG_MiscFlags db 1 ; Miscellaneous Flags (See EQUates)
2003CFG_PartDefault db 0 ; Default-Partition (Base=0)
2004
2005CFG_PartLast db 0 ; Which Partition was booted last time ? (Base=0)
2006
2007; Do not enable time-out when debugging.
2008IFDEF AUX_DEBUG
2009CFG_TimedBoot db 0 ; Timed Boot Enable (for REAL Enable look TimedBootEnable)
2010ELSE
2011CFG_TimedBoot db 1 ; Timed Boot Enable (for REAL Enable look TimedBootEnable)
2012ENDIF
2013
2014CFG_TimedSecs db 15 ; Timed Boot - How Many Seconds Till Boot
2015CFG_TimedDelay dw 123 ; Timed Boot - Delay
2016CFG_TimedBootLast db 1 ; Timed Boot - Boot From Last Drive Booted From
2017CFG_RememberBoot db 1 ; Remember Manual Boot Choice
2018CFG_RememberTimed db 0 ; Remember if Timed Boot (if both disabled: Boot Default)
2019CFG_IncludeFloppy db 1 ; Include Floppy Drives in Boot-Menu
2020CFG_BootMenuActive db 1 ; Display Boot-Menu (if Disabled: Boot Default)
2021 ; v0.29+ -> 2 - Detailed Bootmenu
2022CFG_PartitionsDetect db 1 ; Autodetect New Partitions (Auto-Add!)
2023CFG_PasswordSetup db 0 ; Ask Password when entering Setup
2024CFG_PasswordSystem db 0 ; Ask Password when booting System
2025CFG_PasswordChangeBoot db 0 ; Ask Password when changing boot partition
2026CFG_ProtectMBR db 0 ; Protect MBR via TSR ?
2027CFG_IgnoreWriteToMBR db 0 ; Just ignore writes to MBR, otherwise crash
2028CFG_FloppyBootGetName db 0 ; Gets floppy name for display purposes
2029CFG_DetectVirus db 0 ; Detect Virus ?
2030CFG_DetectStealth db 0 ; Detect Stealth-Virus ?
2031CFG_DetectVIBR db 0 ; Detect BootRecord-Virus ?
2032CFG_AutoEnterSetup db 0 ; Automatic Enter Setup (first install!)
2033CFG_MasterPassword dw 0101Fh ; Encoded Password (this is just CR)
2034 dw 07A53h
2035 dw 0E797h
2036 dw 0A896h
2037CFG_BootPassword dw 0101Fh ; Another CR... ;-)
2038 dw 07A53h
2039 dw 0E797h
2040 dw 0A896h
2041 db 0 ; Rude-Protection - Removed since v0.28b
2042CFG_LinuxRootPartition db 0 ; Linux Root Partition (Base=0)
2043CFG_TimedKeyHandling db 0 ; Timed Key Handling (for Timed Boot)
2044 ; 0 - Do Nothing
2045 ; 1 - Reset Time
2046 ; 2 - Stop Time
2047CFG_MakeSound db 0 ; Should be clear ;)
2048CFG_FloppyBootGetTimer db 0 ; Floppy Name will get updated every 2 secs
2049CFG_ResumeBIOSbootSeq db 1 ; If BIOS Boot Sequence should be resumed
2050 ; 0 - Disabled
2051 ; 1 - CD-ROM
2052 ; 2 - Network
2053 ; 3 - ZIP/LS120
2054CFG_CooperBars db 0 ; If Cooper Bars should be shown
2055CFG_LinuxCommandLine db 75 dup (0) ; Linux Command Line
2056CFG_LinuxKrnlPartition db 0FFh ; FAT-16 Linux Kernel Partition (Base=0)
2057 ; FFh -> Disabled
2058CFG_LinuxDefaultKernel db 'DEFAULT', 4 dup (32), 0 ; Default Kernel Name
2059CFG_LinuxLastKernel db 11 dup (32), 0 ; Last-Booted Kernel Name
2060CFG_ExtPartitionMShack db 0 ; Extended Partition M$-Hack Global Enable
2061CFG_AutomaticBoot db 0 ; Automatic Booting (only one bootup)
2062CFG_PartAutomatic db 0 ; Partition-No for automatic booting
2063CFG_ForceLBAUsage db 1 ; LBA-BIOS-API forced on any HDD I/O
2064CFG_IgnoreLVM db 0 ; Ignores any LVM-Information
2065
2066
2067;
2068; THERE IS ROOM RESERVED HERE FOR MORE VARIABLES
2069;
2070
2071 ;
2072 ; Drive Letters.
2073 ;
2074 ; BOOKMARK: Stored Drive Letters
2075 ORIGIN 06CB0h
2076
2077
2078; -----------------------------------------------------------------------------
2079; DRIVE LETTERS
2080; -----------------------------------------------------------------------------
2081
2082;
2083; Moved here to make room for packed hiddenparttable.
2084; This gets filled with drive-letters that are assigned using the dl-feature.
2085;
2086DriveLetters db LocIPT_MaxPartitions dup (0)
2087 ; Format is:
2088 ;============
2089 ; Drive-Letter : BYTE (80h-C:, 81h-D:)
2090 ; --------------------> 1 Byte * 45
2091
2092
2093
2094; -----------------------------------------------------------------------------
2095; INSTALL VOLUME
2096; -----------------------------------------------------------------------------
2097
2098 ;
2099 ; Allways have the name of the installation volume
2100 ; at this offset.
2101 ; So future config changes will not break auto-install.
2102 ;
2103 ; BOOKMARK: Name of OS/2 Installation Volume
2104 ORIGIN 06D00h
2105
2106; SET(A)BOOT stores the volume name of the OS/2 system being installed here.
2107; It is truncated to 11 chars because AiR-BOOT currently does not support
2108; longer labelnames. The name is also capitalized.
2109OS2_InstallVolume db 0,'NOPHASEONE' ,0
2110
2111;
2112; THERE IS ROOM RESERVED HERE FOR MORE VARIABLES
2113;
2114
2115
2116; -----------------------------------------------------------------------------
2117; FLOPPY/CDROM/BIOS BOOT ENTRIES
2118; -----------------------------------------------------------------------------
2119
2120 ;
2121 ; 06DABh - 06C00h = 01ABh = 427 bytes.
2122 ; Entries allocated down from 06E00 boundary.
2123 ;
2124 ; BOOKMARK: Floppy/CD-ROM/BIOS Boot Entries
2125 ORIGIN 06DABh ; 427 Boundry
2126
2127; (432 - 5 = 427)
2128AutoDrvLetter db 0
2129AutoDrvLetterSerial dd 0
2130
2131; This entry is also 34 bytes long (466 - 34 = 432)
2132BIOScontIPTentry:
2133 db 0, 0, 0, 0, ' '
2134 db 0, 0FEh, Flags_Bootable
2135 dw 0 ; No Checksum :)
2136 db 0, 1, 0
2137 db 0, 1, 0 ; Location of Partition/Boot Record
2138 dd 0, 0
2139
2140; VIR variables are for the AiR-BOOT Anti Virus Code
2141; Most of them are backups of Interrupt Points, so we can check, if a
2142; stealth virus is on-line, we can intercept its call.
2143; Normal (non stealth) virus are trapped simply by rereading the MBR sector.
2144; If a virus is found, we will restore MBR from Sektor 60/62 and stop the
2145; system from working, so the user has to press reset.
2146; That's saver than a Reboot.
2147;
2148; If a virus is found on the partition to boot, the system will ONLY halt,
2149; nothing more, because we can not remove it. The user shall do it :)
2150; Those viruses are detected via a real nasty method...Checksum-Checking of the
2151; boot-record, which is to be executed. If it does not match the one in our
2152; internal partition table, we will stop. You may however switch this detection
2153; off or just reset it by switching 'VIBR Detection'.
2154
2155; 478 - 12 = 466 ; 466 Sub-Part
2156CFG_VIR_INT08 dd 0 ; pointer to saved 08h entry point
2157CFG_VIR_INT13 dd 0 ; pointer to saved 13h entry point
2158CFG_VIR_INT1C dd 0 ; pointer to saved 1Ch entry point
2159
2160; 478 Boundry (512-34)
2161; This entry is also 34 bytes long
2162FloppyIPTentry db 0, 0, 0, 0, 'FloppyDrive'
2163 db 0, 0FFh, Flags_Bootable
2164 dw 0 ; No Checksum :)
2165 db 0, 1, 0
2166 db 0, 1, 0 ; Location of Partition/Boot Record
2167 dd 0, 0
2168
2169
2170
2171; -----------------------------------------------------------------------------
2172; INTERNAL PARTITION TABLE (IPT)
2173; -----------------------------------------------------------------------------
2174
2175 ;
2176 ; AiR-BOOT Internal Partition Table (IPT)
2177 ;
2178 ; BOOKMARK: Internal Partition Table
2179 ORIGIN % (image_size - 0a00h - (image_size - image_size_60secs))
2180
2181
2182;
2183; Rousseau: This is the start of the AiR-BOOT IPT
2184;
2185PartitionTable db (LocIPT_MaxPartitions * LocIPT_LenOfIPT) dup (0)
2186; no-partitions detected... :]
2187; db 1, 0, 0, 0, 'Harddisc 1'
2188; db 0, 0FFh, Flags_BootAble
2189; dw 0 ; No Checksum :)
2190; db 0, 0, 1
2191; db 0, 0, 1 ; Location of Partition/Boot Record
2192; dd 0, 0
2193
2194 ; Format is:
2195 ;============
2196 ; SerialNumber * 4
2197 ; PartitionName * 11
2198 ; Drive * 1
2199 ; SystemID * 1 (means the partition type)
2200 ; Flags * 1
2201 ; Checksum * 2 (for virus checking)
2202 ; LocationBegin * 3 (where the partition begins)
2203 ; LocationPartTab * 3 (where the partition table is)
2204 ; AbsoluteBegin * 4 (where the partition begins, in absolute sectors)
2205 ; AbsolutePartTab * 4 (where the partition table is, in absolute sectors)
2206 ; --------------------> 34 Bytes (total maximum partition-entries = 30)
2207
2208
2209
2210 ; No need to check overlap here because this string will
2211 ; be overwritten if the maximum partition count is reached.
2212 ; So this is not a critical boundary.
2213 ORG (image_size - 600h - (image_size - image_size_60secs) / 2 - 10)
2214
2215 db 'AiRBOOTPAR' ; 1K internal partition table
2216
2217
2218
2219; -----------------------------------------------------------------------------
2220; HIDDEN PARTITION TABLE (HPT)
2221; -----------------------------------------------------------------------------
2222
2223 ;
2224 ; Hidden Partition Table (6-bit packed as of v1.0.8)
2225 ;
2226 ; BOOKMARK: Hidden Partition Table (packed)
2227 ORIGIN % (image_size - 600h - (image_size - image_size_60secs) / 2)
2228
2229HidePartitionTable db (LocIPT_MaxPartitions * LocHPT_LenOfHPT) dup (0FFh)
2230 ; Format is:
2231 ;============
2232 ; PartitionPtr : BYTE * 30
2233 ; --------------------> 30 Bytes * 45
2234
2235;
2236; Driveletters were here.
2237; Moved down to make room for packed hideparttable.
2238;
2239
2240
2241 ;
2242 ; End of hidden partition table.
2243 ; Check overlap here for security reasons.
2244 ;
2245 ORIGIN % (image_size - 200h - 5)
2246
2247; 79fa - end of packed hide table
2248 db 'ABHID' ; 1K internal Hide-partition table
2249
2250
2251
2252
2253;==============================================================================
2254; Sector 62
2255;==============================================================================
2256; -----------------------------------------------------------------------------
2257; MBR BACKUP
2258; -----------------------------------------------------------------------------
2259
2260 ;
2261 ; AiR-BOOT MBR Backup.
2262 ;
2263 ; BOOKMARK: MBR Backup
2264 ORIGIN % (image_size - 200h)
2265
2266
2267MBR_BackUpMBR db 'AiR-BOOT MBR-BackUp',\
2268 ' - Just to fill this sector with something',0
2269AirBootRocks db 'AiR-BOOT Rocks!',0
2270
2271 db (512 - ($-MBR_BackUpMBR) - 2) dup('M')
2272
2273 ; End of Image signature.
2274 ;
2275 ORIGIN % (image_size - 2)
2276 dw 0BABEh
2277
2278
2279 ;
2280 ; End of Image.
2281 ;
2282 ORIGIN % (image_size)
2283image_end:
2284
2285;
2286; Terminate LDRIMAGE segment.
2287;
2288IFDEF SEGMENTED
2289LDRIMAGE ENDS
2290ENDIF
2291
2292
2293
2294
2295
2296
2297
2298;##############################################################################
2299; BSS SEGMENT
2300;##############################################################################
2301
2302; BOOKMARK: BSS Segment
2303
2304;
2305; Open BSS segment.
2306;
2307IFDEF SEGMENTED
2308VOLATILE SEGMENT USE16 PUBLIC 'BSS'
2309ENDIF
2310
2311
2312
2313sobss:
2314sobss_abs = offset sobss + image_size
2315;------------------------------------------------------------------------------
2316
2317
2318 ;
2319 ; This is the actual start of the BSS.
2320 ; In the past however, we have had a code-loop that went out of bounds,
2321 ; overwriting the start of the BSS.
2322 ;
2323 ; Because important runtime data is stored in the BSS, we offset it
2324 ; by 400h bytes. Since the loader-image is always 62 sectors, which
2325 ; makes it 7c00h in size, the runtime data starts at 8000h.
2326 ; This is the 'BeginOfVariables' location.
2327 ;
2328
2329
2330;
2331; If segmented, offsets are relative to the BSS segment.
2332; They are resolved at link-time.
2333; If not segmented, offsets are relative to the CODE segment.
2334;
2335IFDEF SEGMENTED
2336 ORG 00400h ; 7c00h + 400h = 8000h
2337ELSE
2338 ORG 08000h ; 8000h
2339ENDIF
2340
2341
2342; -----------------------------------------------------------------------------
2343; START OF BSS DATA
2344; -----------------------------------------------------------------------------
2345; This space actually gets initialized in PreCrap to NUL (till EndOfVariables)
2346BeginOfVariables:
2347BeginOfVariablesAbs = offset BeginOfVariables + image_size
2348
2349
2350; -----------------------------------------------------------------------------
2351; SECTOR BUFFERS
2352; -----------------------------------------------------------------------------
2353; BOOKMARK: Sector Buffers
2354PartitionSector db 512 dup (?) ; Temporary Sector for Partition
2355PBRSector db 512 dup (?) ; Temporary Sector for JFS/HPFS writeback
2356LVMSector db 512 dup (?) ; Temporary Sector for LVM
2357TmpSector db 512 dup (?) ; Temporary Sector
2358Scratch db 512 dup (?) ; Scratch buffer
2359 ALIGN 16
2360
2361
2362; -----------------------------------------------------------------------------
2363; NEW PARTITION TABLE
2364; -----------------------------------------------------------------------------
2365; Everything used to build a new IPT and reference it to the old one
2366; BOOKMARK: New Partition Table
2367NewPartTable db 1536 dup (?) ; New Partition Table
2368 ALIGN 16
2369
2370
2371; -----------------------------------------------------------------------------
2372; NEW HIDE PARTITION TABLE
2373; -----------------------------------------------------------------------------
2374; BOOKMARK: New Hide-Partition Table
2375NewHidePartTable db LocIPT_MaxPartitions * LocHPT_LenOfHPT dup (?)
2376 ALIGN 16
2377
2378
2379; -----------------------------------------------------------------------------
2380; NEW DRIVE LETTERS
2381; -----------------------------------------------------------------------------
2382; BOOKMARK: Logical Drive-Letters
2383NewDriveLetters db LocIPT_MaxPartitions dup (?)
2384 ALIGN 16
2385
2386
2387; -----------------------------------------------------------------------------
2388; PARTITION SIZE TABLE
2389; -----------------------------------------------------------------------------
2390; Size-Table (6 bytes per partition)
2391; BOOKMARK: Partition Size Table
2392PartitionSizeTable db LocIPT_MaxPartitions * 6 dup (?)
2393 ALIGN 16
2394
2395
2396; -----------------------------------------------------------------------------
2397; PARTITION POINTERS
2398; -----------------------------------------------------------------------------
2399; Maximum is 52 word entries till now
2400; BOOKMARK: Partition Pointers
2401PartitionPointers dw 52 dup (?)
2402 ALIGN 16
2403
2404; Count of total Partition Pointers
2405PartitionPointerCount db ?
2406 ALIGN 16
2407
2408
2409; -----------------------------------------------------------------------------
2410; XREF TABLE
2411; -----------------------------------------------------------------------------
2412; X-Reference Table (holds new partnr, index is old part nr)
2413; BOOKMARK: Xref Table
2414PartitionXref db LocIPT_MaxPartitions dup (?)
2415 ALIGN 16
2416
2417
2418; -----------------------------------------------------------------------------
2419; VOLUME LETTERS
2420; -----------------------------------------------------------------------------
2421; Volume-Letters
2422; 0 - no LVM support
2423; 1 - LVM support, but no letter
2424; 'C'-'Z' - assigned drive letter
2425; BOOKMARK: Volume Drive Letters
2426PartitionVolumeLetters db LocIPT_MaxPartitions dup (?)
2427 ALIGN 16
2428
2429
2430; -----------------------------------------------------------------------------
2431; MISC VARS AND FLAGS
2432; -----------------------------------------------------------------------------
2433; BOOKMARK: Misc Vars and Flags
2434TotalHarddiscs db ? ; Total harddrives (by POST)
2435LBASwitchTable db 128 dup (?) ; Bit 25-18 for CHS/LBA Switching
2436NewPartitions db ? ; Freshly found partitions
2437 ; Independent of SaveConfiguration
2438TooManyPartitions db ? ; Non-zero if too many partitions found
2439
2440VideoIO_Segment dw ? ; Segment for Video I/O
2441
2442ExtendedAbsPos dd ? ; Extended Partition Absolute Position
2443ExtendedAbsPosSet db ? ; If Absolute Position set
2444
2445CurPartition_Location dw 4 dup (?) ; Where did current partition come from?
2446CurIO_UseExtension db ? ; 1-Use INT 13h EXTENSIONS
2447 ; (filled out by PreCrap)
2448CurIO_Scanning db ? ; 1-AiR-BOOT is scanning partitions
2449 ; (for detailed error message)
2450 ALIGN 16
2451
2452
2453; -----------------------------------------------------------------------------
2454; MENU RELATED VARS
2455; -----------------------------------------------------------------------------
2456Menu_EntrySelected db ? ; Which partition we boot this time...
2457Menu_UpperPart db ? ; Which number (Base=0) is the partition upper pos
2458Menu_AbsoluteX db ? ; Pos where Menu stuff starts
2459Menu_TotalParts db ? ; Copy of CFG_BootParts
2460Menu_TotalLines db ? ; Total Lines on Screen used for BootMenu
2461Menu_EntryDefault db ? ; Default Entry in filtered View
2462Menu_EntryLast db ? ; LastBooted Entry in filtered View
2463Menu_EntryAutomatic db ? ; Automatic Entry in filtered View
2464 ; - All adjusted to menu locations
2465 ALIGN 16
2466
2467
2468; -----------------------------------------------------------------------------
2469; PARTITION RELATED VARS
2470; -----------------------------------------------------------------------------
2471PartSetup_UpperPart db ? ; Partition-Setup (like Menu_UpperPart)
2472PartSetup_ActivePart db ? ; Active Partition
2473PartSetup_HiddenUpper db ? ; (like Menu_UpperPart)
2474PartSetup_HiddenX db ? ; Pos for Hidden-Setup
2475PartSetup_HiddenAdd db ? ; Adjust for Hidden-Setup
2476 ALIGN 16
2477
2478
2479; -----------------------------------------------------------------------------
2480; TIMER / SETUP RELATED VARS
2481; -----------------------------------------------------------------------------
2482TimedBootEnable db ? ; Local Enable/Disable for timed boot
2483TimedTimeOut dd ? ; TimeOut Timer for TimedBoot (too much time here;)
2484TimedSecondLeft db ? ; How many seconds are left till boom ?
2485TimedSecondBack db ? ; To get a modification noticed
2486TimedBootUsed db ? ; Timed Boot used for bootup ?
2487FloppyGetNameTimer dd ? ; Timer for Floppy-Get-Name
2488SETUP_KeysOnEntry db ? ; which Shift Status was there, when booting ?
2489SETUP_ExitEvent db ? ; Exit Event to end SETUP
2490TempPasswordEntry db 17 dup (?)
2491SETUP_OldPwd db 17 dup (?)
2492SETUP_NewPwd db 17 dup (?)
2493SETUP_VerifyPwd db 17 dup (?)
2494StartSoundPlayed db ?
2495ChangePartNameSave db ? ; Save label after user-edit ?
2496SyncLvmLabels db ? ; Sync LVM labels after user-edit ?
2497 ALIGN 16
2498
2499
2500; -----------------------------------------------------------------------------
2501; FX RELATED VARS
2502; -----------------------------------------------------------------------------
2503FX_UseCount dw ?
2504FX_OverallTimer dw ?
2505FX_WideScrollerTimer dw ?
2506FX_WideScrollerCurPos dw ?
2507FX_WideScrollerSpeed db ?
2508FX_WideScrollerSpeedState db ?
2509FX_WideScrollerDirection db ?
2510FX_WideScrollerAbsDirection db ?
2511FX_WideScrollerBounceSpeed db ?
2512FX_CooperBarsTimer dw ?
2513 ALIGN 16
2514
2515; Dynamically Generated Tables - do not need to get initialized with NUL
2516FX_CooperColors db 672 dup (?) ; 7 cooper bars*96 - runtime calculated
2517FX_CooperState db 7 dup (?)
2518FX_SinusPos db 7 dup (?)
2519FX_CooperPos dw 7 dup (?)
2520 ALIGN 16
2521
2522
2523; -----------------------------------------------------------------------------
2524; CHARSET BUFFER
2525; -----------------------------------------------------------------------------
2526CharsetTempBuffer db 4096 dup (?) ; Uninitialized Charset buffer
2527 ALIGN 16
2528
2529
2530; -----------------------------------------------------------------------------
2531; LVM CRC TABLE
2532; -----------------------------------------------------------------------------
2533LVM_CRCTable dd 256 dup (?) ; LVM-CRC (->SPECiAL\LVM.asm)
2534 ALIGN 16
2535
2536
2537; -----------------------------------------------------------------------------
2538; LVM DRIVE-LETTER MAP
2539; -----------------------------------------------------------------------------
2540; Get's initialized at startup to: 00000011111111111111111111111100b
2541; Meaning A,B not free; C-Z free, rest unused. (right to left)
2542; Each partition with an assigned drive-letter clears a bit in this map.
2543FreeDriveletterMap dd ?
2544 ALIGN 16
2545
2546
2547; -----------------------------------------------------------------------------
2548; OS/2 PHASE1 RELATED
2549; -----------------------------------------------------------------------------
2550Phase1Active db ?
2551OldPartitionCount db ?
2552 ALIGN 16
2553
2554
2555; -----------------------------------------------------------------------------
2556; ARRAY OF DISK INFORMATION STRUCTURES
2557; -----------------------------------------------------------------------------
2558; Array of DISKINFO structures
2559DiskInformation db MaxDisks dup(DISKINFO_Size dup(?))
2560 ALIGN 16
2561
2562
2563; -----------------------------------------------------------------------------
2564; INT13X DAP
2565; -----------------------------------------------------------------------------
2566; Disk Address Package that holds information for LBA-access using INT13X
2567INT13X_DAP db ? ; Size of paket, inserted by code
2568 db ? ; Reserved
2569INT13X_DAP_NumBlocks dw ? ; Number of blocks
2570INT13X_DAP_Transfer dd ? ; Transfer Adress
2571INT13X_DAP_Absolute dd ? ; Absolute Sector
2572 dd ? ; Second Part of QWORD
2573INT13X_DAP_Size = $-offset [INT13X_DAP] ; Calculated size
2574 ALIGN 16
2575
2576
2577; -----------------------------------------------------------------------------
2578; DEBUG
2579; -----------------------------------------------------------------------------
2580; Some debug area.
2581dbg_scratch db 512 dup(?)
2582 ALIGN 16
2583
2584
2585; End of transient variables.
2586EndOfVariables:
2587EndOfVariablesAbs = offset EndOfVariables + image_size
2588
2589
2590
2591; -----------------------------------------------------------------------------
2592; OLD AND NEW STACKS
2593; -----------------------------------------------------------------------------
2594; BOOKMARK: Storage for Old and New Stack Pointers
2595;
2596; These need to be outside the variable section because AiR-BOOT can restart
2597; itself in debug-mode. If the OldSP and OldSS would be in the variable area,
2598; they would be cleared on AiR-BOOT restart.
2599;
2600
2601; The variable section is cleared word-wise, so it could clear one byte extra
2602; depending on the alignment and size. This DD prevents the OldSP and OldSS
2603; to be partly overwritten by the clearing routine.
2604 dd ?
2605 ALIGN 16
2606
2607; SS:SP from before our relocation.
2608; The registers values when the BIOS transferred control to us were pushed
2609; on this stack.
2610
2611OldSP dw ?
2612OldSS dw ?
2613
2614; SS:SP currently in use.
2615; They are temporarily dumped here so we can pop the resgisters from
2616; the old stack to display them in debug mode.
2617CurrentSP dw ?
2618CurrentSS dw ?
2619 ALIGN 16
2620
2621; Usually, commits are buildable and some minor checking has been done that
2622; whole disks do not get wiped. However, there are situations where stuff is
2623; in such a flux that it would be better to do non-buildable commits.
2624; That makes it possible to record the changes piecemeal without the danger of
2625; accidently using the resulting loader. Of course everyone is clever enough
2626; to _never_ build commits marked as 'testing' and install the result in
2627; environments where wiping all attached disks and sticks would be a problem...
2628;~ force_build_error dd 0f000h dup(?)
2629
2630;
2631; End of BSS segment.
2632;
2633eobss:
2634eobss_abs = offset eobss + image_size
2635;
2636; Total RAM occupied, including BSS.
2637; BASE is 8000:0000, LIMIT is 8000:FFFF.
2638; Note that the LDRIMAGE is of constant size, 7C00h = 62 sectors of 512 bytes.
2639;
2640resident_size = offset eobss + image_size
2641
2642;
2643; Close BSS segment.
2644;
2645IFDEF SEGMENTED
2646 VOLATILE ENDS
2647ELSE
2648 LDRIMAGE ENDS
2649ENDIF
2650
2651 ; BOOKMARK: End of Module
2652 END AiR_BOOT
2653
Note: See TracBrowser for help on using the repository browser.