Ignore:
Timestamp:
May 5, 2011, 2:00:00 PM (14 years ago)
Author:
Ben Rietbroek
Message:

AiR-BOOT v1.06 -- Complete sourceforge mirror. (r56) [2010-02-19]
Signature-date: 2006-03-13.
Also contains binairy releases from v1.01 to v1.06, cd-rom images, etc.
If you want the whole pre v1.07 shebang, checkout this revision's trunk.
The v1.06 reference version is in 'tags/v1.06r'.
Note that this reference version uses 'NL' for 'Dutch'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BOOTCODE/AIR-BOOT.ASM

    r26 r29  
    1 
    2 ; Disclaimer:
    3 ;=============
    4 ; The sourcecode is released via www.netlabs.org CVS *ONLY*.
    5 ;  You MUST NOT upload it to other servers nor republish it in any way.
    6 ;  The sourcecode is still COPYRIGHTED and NOT RELEASED UNDER GPL.
    7 ;  It's (c) Copyright 1998-2003 by Martin Kiewitz.
    8 ;  You may recompile the source and do *PRIVATE* modifications, but please keep
    9 ;  in mind that modifying this code needs at least *some* assembly skill. If
    10 ;  you mess up your system, because you needed to hack your way through, don't
    11 ;  blame me. Releasing a customized version of AiR-BOOT, selling it in any form
    12 ;  or reusing parts of this source is *PROHIBITED*. Ask me, if you have some
    13 ;  idea about new functionality *before* developing the code, otherwise I will
    14 ;  definitely reject it. Also please accept, that I have some basic design
    15 ;  rules on AiR-BOOT and I will maintain them at all costs, so this won't get
    16 ;  another GRUB.
     1; AiR-BOOT (c) Copyright 1998-2008 M. Kiewitz
     2;
     3; This file is part of AiR-BOOT
     4;
     5; AiR-BOOT is free software: you can redistribute it and/or modify it under
     6;  the terms of the GNU General Public License as published by the Free
     7;  Software Foundation, either version 3 of the License, or (at your option)
     8;  any later version.
     9;
     10; AiR-BOOT is distributed in the hope that it will be useful, but WITHOUT ANY
     11;  WARRANTY: without even the implied warranty of MERCHANTABILITY or FITNESS
     12;  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
     13;  details.
     14;
     15; You should have received a copy of the GNU General Public License along with
     16;  AiR-BOOT. If not, see <http://www.gnu.org/licenses/>.
     17;
    1718
    1819;---------------------------------------------------------------------------
    1920;                                                      AiR-BOOT / MAIN-CODE
    2021;---------------------------------------------------------------------------
     22;
    2123
    2224; If ReleaseCode is not defined, it will produce debug-able code...
    2325ReleaseCode                 equ    -1
    24 ; ReleaseCommercial           equ    -1
    2526
    2627JUMPS
     
    2930
    3031IFDEF ReleaseCode
    31    ExecBaseSeg              equ     00000h
    32    ExecBasePtr              equ     07C00h ; BIOS starts our MBR at 0:7C00
     32   StartBaseSeg             equ     00000h
     33   StartBasePtr             equ     07C00h ; BIOS starts our MBR at 0:7C00
    3334  ELSE
    34    ExecBaseSeg              equ     03567h ; Adjust to DOS segment
    35    ExecBasePtr              equ     00100h
     35   StartBaseSeg             equ     03A98h ; Adjust to DOS segment
     36   StartBasePtr             equ     00100h
    3637ENDIF
    3738BootBaseSeg                 equ      8000h
     
    4647VideoIO_FXSegment           equ     0A000h
    4748
    48 Include ..\..\..\JimiHelp\asm.inc\stdmacro.inc
    49 Include ..\INSTALL\GLOBAL.ASM\airboot.inc
     49Include ..\INCLUDE\asm.inc
     50;Include ..\INCLUDE\DOS\airboot.inc
    5051
    5152TextChar_WinLineRight       equ       0C4h ; 'Ä'
     
    7576LocBR_Magic                 equ        510
    7677
     78; Offsets for LVM Information Sector
     79LocLVM_SignatureStart       equ          0
     80LocLVM_SignatureByte0       equ          2
     81LocLVM_CRC                  equ          8  ; CRC is a DWORD
     82LocLVM_MaxEntries           equ          4
     83LocLVM_StartOfEntries       equ         60  ; (contains maximum of 4 entries)
     84LocLVM_LenOfEntry           equ         60
     85LocLVM_VolumeID             equ          0  ; is DWORD
     86LocLVM_PartitionID          equ          4  ; is DWORD
     87LocLVM_PartitionSize        equ          8  ; is DWORD
     88LocLVM_PartitionStart       equ         12  ; is DWORD
     89LocLVM_VolumeLetter         equ         18  ; is BYTE (Letter C-Z or 0)
     90LocLVM_VolumeName           equ         20  ; 20 bytes
     91LocLVM_PartitionName        equ         40  ; 20 bytes
     92
    7793; Offsets for IPT (Internal Partition Table)
    7894LocIPT_MaxPartitions        equ         30  ; Maximum LocIPT_MaxPartitions
     
    105121FileSysFlags_FAT32          equ   00010000b ; FAT 32 specific name getting
    106122FileSysFlags_NoName         equ   00100000b ; No Name - use PartitionName
     123FileSysFlags_DriveLetter    equ   01000000b ; DriveLetter Feature possible
    107124
    108125Keys_Up                     equ         48h
     
    139156                            org 00000h                          ; Sector 1
    140157;---------------------------------------------------------------------------
    141 AiR_BOOT:     cli
     158AiR_BOOT:     cli                        ; Some M$ operating systems need a CLI
     159                                         ;  here otherwise they will go beserk
     160                                         ;  and will do funny things during
     161                                         ;  boot phase, it's laughable!
    142162              db      0EBh               ; JMP-Short -> MBR_Start
    143               db      'AiRBOOT', 02h, 03h, 20h, 03h, 01h, 01h, TXT_LanguageID
     163              db      'AiRBOOT', 13h, 03h, 20h, 06h, 01h, 06h, TXT_LanguageID
    144164              ; ID String, Date and Version Number, U for US version
    145165              db      1                  ; Total Sectors Count,
     
    148168
    149169MBR_Start:    sti                        ;    This opcode is dedicated to:
    150               cld                        ;          =FUCK MICROSOFT=
    151               mov     ax, ExecBaseSeg    ;        fuck every M$-coder,
    152               mov     ds, ax             ;      fuck every M$-executive,
    153               mov     si, ExecBasePtr    ;    fuck every M$-supporter and
    154               mov     ax, BootBaseSeg    ; fuck everyone that is working for
    155               mov     es, ax             ;     that evil business. k?thx
     170              cld                        ;    =MICROSOFT JUMP DEPARTMENT=
     171              mov     ax, StartBaseSeg
     172              mov     ds, ax
     173              mov     si, StartBasePtr
     174              mov     ax, BootBaseSeg
     175              mov     es, ax
    156176              mov     di, BootBasePtr
    157177              IFDEF ReleaseCode
     
    171191              mov     dx, 500
    172192              int     15h                ; Wait to display the whole screen :]
    173 MBR_FuckUpSys:cli
    174               jmp     MBR_FuckUpSys
     193MBR_HaltSys:  cli
     194              jmp     MBR_HaltSys
    175195
    176196              db      'FUCKMS:>'
    177               jmp     MBR_Start          ; WE HAVE TO DO THIS CAUSE MICKEYSOFT
    178                                          ;  This needs to be at THIS fixed
    179                                          ;  location, don't modify it.
     197              jmp     MBR_Start          ; We jump here, because I needed to
     198                                         ;  insert a CLI on start and did not
     199                                         ;  want to change AiR-BOOT detection
     200                                         ;  because of Microsoft inventions...
    180201
    181202              db      'LOAD ERROR!', 0
     
    250271              int     13h
    251272              jnc     MBR_ConfigCopy_NoError
     273             MBR_ConfigCopy_LoadError:
    252274              call    MBR_LoadError      ; Will Abort BootUp
    253275             MBR_ConfigCopy_NoError:
     
    256278              mov     cx, 0002h
    257279              mov     ah, 02h
    258               mov     al, ds:[TotalSectorsUsedPtr]
     280              mov     al, ds:[10h]
    259281              int     13h
    260282              jnc     MBR_RealStart_NoError
    261               call    MBR_LoadError      ; Will Abort BootUp
     283              jmp     MBR_ConfigCopy_LoadError
     284              ; [v1.05+]
     285              ; Signature for IBM's LVM to detect our "powerful" features ;)
     286              db      'I13X'
    262287             MBR_RealStart_NoError:
    263288              ; Now Check Code with CheckSum
    264289              mov     si, offset FurtherMoreLoad
    265               movzx   cx, bptr ds:[TotalSectorsUsedPtr]
     290              movzx   cx, bptr ds:[10h]
    266291              xor     bx, bx
    267292             MBR_RealStart_CheckCodeLoop:
     
    291316                        ; 10h -> FAT32 - Name Getting Scheme
    292317                        ; 20h -> No Name To Get (use Partition Name)
     318                        ; 40h -> 'L' flag possible
    293319                db      'AiRSYS-TABLE'
    294 FileSysIDs:     db      01h, 11h,01h, 04h,014h,01h, 06h,016h,01h, 0Eh,00Eh,01h
    295                 db      07h, 17h,01h, 08h,017h,21h, 35h,035h,00h,0EBh,0EBh,01h
    296                 db      09h, 19h,11h, 0Bh,01Bh,11h, 0Ch,01Ch,11h, 01h,001h,01h
     320FileSysIDs:     db      01h, 11h,01h, 04h,014h,01h, 06h,016h,41h, 0Eh,00Eh,01h
     321                db      07h, 17h,41h, 08h,017h,21h, 35h,035h,20h,0FCh,017h,41h
     322                db      09h, 19h,11h, 0Bh,01Bh,11h, 0Ch,01Ch,11h,0EBh,0EBh,01h
    297323                db      63h, 63h,21h, 81h,081h,21h, 83h,083h,21h, 40h,040h,21h
    298324                db     0A5h,0A5h,21h,0A6h,0A6h,21h, 82h,082h,20h,0A7h,0A7h,21h
     
    306332
    307333FileSysNames:   db      'FAT12   ', 'FAT16   ', 'FAT16Big', 'FAT16Big'
    308                 db      'HPFS    ', 'NTFS    ', 'LVM-Data', 'BeOS    '
    309                 db      'FAT32   ', 'FAT32   ', 'FAT32   ', '        '
     334                db      'HPFS    ', 'NTFS    ', 'LVM-Data', 'JFS     '
     335                db      'FAT32   ', 'FAT32   ', 'FAT32   ', 'BeOS    '
    310336                db      'Unix    ', 'Minix   ', 'Linux   ', 'Venix   ' ; x row ;)
    311337                db      'BSD/386 ', 'OpenBSD ', 'LinuxSwp', 'NeXTSTEP'
     
    331357                 call    AFTERCRAP_Main
    332358
    333                  ; Now get FAT16-Linux Kernel Partition, If requested
    334                  cmp     [CFG_LinuxKrnlPartition], 0FFh
    335                  je      MBR_Main_NoLinuxKrnlPartition
    336                  call    LINUX_InitFAT16access
    337                 MBR_Main_NoLinuxKrnlPartition:
     359; [Linux support removed since v1.02]
     360;                 ; Now get FAT16-Linux Kernel Partition, If requested
     361;                 cmp     [CFG_LinuxKrnlPartition], 0FFh
     362;                 je      MBR_Main_NoLinuxKrnlPartition
     363;                 call    LINUX_InitFAT16access
     364;                MBR_Main_NoLinuxKrnlPartition:
    338365
    339366                 ; SetUp PartitionPointers for BootMenu (filter non-bootable)
     
    394421
    395422                 IFNDEF ReleaseCode
     423                    ; Debug Code to terminate DOS .COM program - used for
     424                    ;  testing AiR-BOOT
     425                    int 3
    396426                    mov     ax, 6200h
    397427                    int     21h
     
    416446Include SETUP\MAiN.ASM                   ; The whole AiR-BOOT SETUP
    417447Include SPECiAL\ViRUS.asm                ; Virus Detection / Anti-Virus
    418 Include SPECiAL\FAT16.asm                ; FAT-16 Support
    419 Include SPECiAL\LINUX.asm                ; Linux Kernel Support
    420 Include SPECiAL\F00K\BILLSUXX.asm        ; Extended Partition - Micro$haft-Hack
     448; [Linux support removed since v1.02]
     449;Include SPECiAL\FAT16.asm                ; FAT-16 Support
     450;Include SPECiAL\LINUX.asm                ; Linux Kernel Support
     451Include SPECiAL\F00K\BILLSUXX.asm        ; Extended Partition - Microsoft-Hack
    421452Include SPECiAL\SOUND.asm                ; Sound
    422453Include SPECiAL\APM.asm                  ; Power Managment Support
    423454Include SPECiAL\FX.asm                   ; l33t Cooper-Bars/Scrolling <bg>
     455Include SPECiAL\LVM.asm                  ; LVM-specific code
    424456IFDEF TXT_IncludeCyrillic
    425457   Include SPECiAL\CHARSET.asm           ; Charset Support (e.g. Cyrillic)
     
    441473Configuration:
    442474                             db 'AiRCFG-TABLE­'
    443                              db 01h, 00h, 'U' ; "Compressed" ID String
     475                             db 01h, 02h, 'U' ; "Compressed" ID String
     476                             ; This is still version 1.02, because nothing got
     477                             ;  changed...
    444478
    445479CFG_LastTimeEditLow          dw     0    ; Last Time Edited Stamp (will incr every setup)
     
    504538CFG_PartAutomatic            db     0    ; Partition-No for automatic booting
    505539CFG_ForceLBAUsage            db     0    ; LBA-BIOS-API forced on any HDD I/O
     540CFG_IgnoreLVM                db     0    ; Ignores any LVM-Information
    506541
    507542; VIR variables are for the AiR-BOOT Anti Virus Code
     
    595630; This space actually gets initialized in PreCrap to NUL (till EndOfVariables)
    596631BeginOfVariables:
     632PartitionSector              db   512 dup (?) ; Temporary Sector for Partition
     633LVMSector:                   db   512 dup (?) ; Temporary Sector for LVM
    597634TmpSector:                   db   512 dup (?) ; Temporary Sector
    598635TmpSector2:
     
    606643PartitionPointerCount        db     ?         ; Count of total Partition Pointers
    607644PartitionXref                db    30 dup (?) ; X-Reference Table
    608 
    609 TotalHarddiscs               db     ?    ; Total harddrives (by POST)
    610 NewPartitions                db     ?    ; Freshly found partitions
     645PartitionVolumeLetters       db    30 dup (?) ; Volume-Letters
     646                                              ;  0 - no LVM support
     647                                              ;  1 - LVM support, but no letter
     648                                              ;  'C'-'Z' - assigned drive letter
     649
     650TotalHarddiscs               db     ?         ; Total harddrives (by POST)
     651LBASwitchTable               db   128 dup (?) ; Bit 25-18 for CHS/LBA Switching
     652NewPartitions                db     ?         ; Freshly found partitions
    611653
    612654VideoIO_Segment              dw     ?    ; Segment for Video I/O
     
    621663                                         ;    (for detailed error message)
    622664
    623 GotLinux                     db     ?    ; 1-Linux found
     665; [Linux support removed since v1.02]
     666;GotLinux                     db     ?    ; 1-Linux found
    624667
    625668Menu_EntrySelected           db     ?    ; Which partition we boot this time...
     
    652695SETUP_VerifyPwd              db    17 dup (?)
    653696StartSoundPlayed             db     ?
     697ChangePartNameSave           db     ?
    654698
    655699FX_UseCount                  dw     ?
     
    664708FX_CooperBarsTimer           dw     ?
    665709
    666 FAT16_Drive                  db     ?    ; FAT-16: Drive of FAT16-partition
    667 FAT16_AbsPartitionBegin      dd     ?    ; FAT-16: LBA Begin of Partition
    668 FAT16_SecsPerCluster         db     ?    ; FAT-16: Sectors Per Cluster
    669 FAT16_NumOfRootEntries       dw     ?    ; FAT-16: Number of Root Entries
    670 FAT16_SecsPerFAT             dw     ?    ; FAT-16: Sectors Per FAT
    671 FAT16_AbsFATBegin            dd     ?    ; FAT-16: LBA Begin of FAT
    672 FAT16_AbsRootBegin           dd     ?    ; FAT-16: LBA Begin of Root
    673 FAT16_AbsClusterBegin        dd     ?    ; FAT-16: LBA Begin of Clusters
    674 FAT16_FATCacheSector         db     ?    ; FAT-16: FAT-Sector No in Cache
    675 FAT16_FATCache               db   512 dup (?) ; FAT-16: FAT-Area Cache
    676 
    677 LINUX_KernelEntries          db   680 dup (?) ; 34*20 -> Space for Kernel-Entries
    678 LINUX_KernelNo               db     ?         ; Total of Kernels in KernelEntries
    679 LINUX_KernelSizeTable        db   120 dup (?) ; Size-Table (6 bytes per kernel)
     710; [Linux support removed since v1.02]
     711;FAT16_Drive                  db     ?    ; FAT-16: Drive of FAT16-partition
     712;FAT16_AbsPartitionBegin      dd     ?    ; FAT-16: LBA Begin of Partition
     713;FAT16_SecsPerCluster         db     ?    ; FAT-16: Sectors Per Cluster
     714;FAT16_NumOfRootEntries       dw     ?    ; FAT-16: Number of Root Entries
     715;FAT16_SecsPerFAT             dw     ?    ; FAT-16: Sectors Per FAT
     716;FAT16_AbsFATBegin            dd     ?    ; FAT-16: LBA Begin of FAT
     717;FAT16_AbsRootBegin           dd     ?    ; FAT-16: LBA Begin of Root
     718;FAT16_AbsClusterBegin        dd     ?    ; FAT-16: LBA Begin of Clusters
     719;FAT16_FATCacheSector         db     ?    ; FAT-16: FAT-Sector No in Cache
     720;FAT16_FATCache               db   512 dup (?) ; FAT-16: FAT-Area Cache
     721;
     722;LINUX_KernelEntries          db   680 dup (?) ; 34*20 -> Space for Kernel-Entries
     723;LINUX_KernelNo               db     ?         ; Total of Kernels in KernelEntries
     724;LINUX_KernelSizeTable        db   120 dup (?) ; Size-Table (6 bytes per kernel)
    680725EndOfVariables:
    681726
     727; Dynamically Generated Tables - do not need to get initialized with NUL
    682728FX_CooperColors              db   672 dup (?) ; 7 cooper bars*96 - runtime calculated
    683729FX_CooperState:              db     7 dup (?)
     
    685731FX_CooperPos:                dw     7 dup (?)
    686732CharsetTempBuffer            db  4096 dup (?) ; Uninitialized Charset buffer
     733LVM_CRCTable:                dd   256 dup (?) ; LVM-CRC (->SPECiAL\LVM.asm)
    687734
    688735code_seg        ends
Note: See TracChangeset for help on using the changeset viewer.