Changeset 181 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Main.asm
- Timestamp:
- Nov 13, 2011, 3:38:40 PM (13 years ago)
- google:author:
- krille_n_@hotmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Main.asm
r179 r181 3 3 ; : aitotat@gmail.com 4 4 ; : 5 ; : Greg Lindhorst 6 ; : gregli@hotmail.com 7 ; ; 5 8 ; : Krister Nordvall 6 9 ; : krille_n_@hotmail.com … … 13 16 14 17 15 ; Included .inc files16 %include "AssemblyLibrary.inc" ; Assembly Library. Must be included first!17 %include "IntController.inc" ; For Interrupt Controller equates18 %include "ATA_ID.inc" ; For ATA Drive Information structs19 %include "IdeRegisters.inc" ; For ATA Registers, flags and commands20 %include "Int13h.inc" ; Equates for INT 13h functions18 ; Included .inc files 19 %include "AssemblyLibrary.inc" ; Assembly Library. Must be included first! 20 %include "IntController.inc" ; For Interrupt Controller equates 21 %include "ATA_ID.inc" ; For ATA Drive Information structs 22 %include "IdeRegisters.inc" ; For ATA Registers, flags and commands 23 %include "Int13h.inc" ; Equates for INT 13h functions 21 24 %ifdef MODULE_EBIOS 22 %include "EBIOS.inc" ; Equates for EBIOS functions23 %endif 24 %include "CustomDPT.inc" ; For Disk Parameter Table25 %include "RomVars.inc" ; For ROMVARS and IDEVARS structs26 %include "RamVars.inc" ; For RAMVARS struct27 %include "BootVars.inc" ; For BOOTVARS and BOOTNFO structs28 %include "BootMenu.inc" ; For Boot Menu29 %include "IDE_8bit.inc" ; For IDE 8-bit data port macros30 %include "DeviceIDE.inc" ; For IDE device equates25 %include "EBIOS.inc" ; Equates for EBIOS functions 26 %endif 27 %include "CustomDPT.inc" ; For Disk Parameter Table 28 %include "RomVars.inc" ; For ROMVARS and IDEVARS structs 29 %include "RamVars.inc" ; For RAMVARS struct 30 %include "BootVars.inc" ; For BOOTVARS and BOOTNFO structs 31 %include "BootMenu.inc" ; For Boot Menu 32 %include "IDE_8bit.inc" ; For IDE 8-bit data port macros 33 %include "DeviceIDE.inc" ; For IDE device equates 31 34 32 35 … … 39 42 at ROMVARS.wRomSign, dw 0AA55h ; PC ROM signature 40 43 at ROMVARS.bRomSize, db CNT_ROM_BLOCKS ; ROM size in 512B blocks 41 at ROMVARS.rgbJump, 44 at ROMVARS.rgbJump, jmp Initialize_FromMainBiosRomSearch 42 45 at ROMVARS.rgbSign, db "XTIDE120" ; Signature for flash program 43 46 at ROMVARS.szTitle … … 53 56 54 57 ;;; For OR'ing into wFlags below 55 ;;; 58 ;;; 56 59 %ifdef MODULE_SERIAL 57 MAIN_FLG_MODULE_SERIAL equFLG_ROMVARS_MODULE_SERIAL58 %else 59 MAIN_FLG_MODULE_SERIAL equ060 MAIN_FLG_MODULE_SERIAL equ FLG_ROMVARS_MODULE_SERIAL 61 %else 62 MAIN_FLG_MODULE_SERIAL equ 0 60 63 %endif 61 64 62 65 %ifdef MODULE_EBIOS 63 MAIN_FLG_MODULE_EBIOS equFLG_ROMVARS_MODULE_EBIOS64 %else 65 MAIN_FLG_MODULE_EBIOS equ066 MAIN_FLG_MODULE_EBIOS equ FLG_ROMVARS_MODULE_EBIOS 67 %else 68 MAIN_FLG_MODULE_EBIOS equ 0 66 69 %endif 67 70 … … 109 112 at ROMVARS.ideVarsSerialAuto+IDEVARS.bDevice, db DEVICE_SERIAL_PORT 110 113 at ROMVARS.ideVarsSerialAuto+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags, db FLG_DRVPARAMS_BLOCKMODE 111 at ROMVARS.ideVarsSerialAuto+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags, db FLG_DRVPARAMS_BLOCKMODE 112 %endif 114 at ROMVARS.ideVarsSerialAuto+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags, db FLG_DRVPARAMS_BLOCKMODE 115 %endif 113 116 %else 114 117 ;-----------------------------------; … … 142 145 at ROMVARS.ideVarsSerialAuto+IDEVARS.bDevice, db DEVICE_SERIAL_PORT 143 146 at ROMVARS.ideVarsSerialAuto+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags, db FLG_DRVPARAMS_BLOCKMODE 144 at ROMVARS.ideVarsSerialAuto+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags, db FLG_DRVPARAMS_BLOCKMODE 145 %endif 147 at ROMVARS.ideVarsSerialAuto+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags, db FLG_DRVPARAMS_BLOCKMODE 148 %endif 146 149 %endif 147 150 iend 148 151 149 152 150 ; Libraries and data151 %include "AssemblyLibrary.asm"152 %include "Strings.asm" ; For BIOS message strings153 154 ; Initialization and drive detection155 %include "Initialize.asm" ; For BIOS initialization156 %include "Interrupts.asm" ; For Interrupt initialization157 %include "RamVars.asm" ; For RAMVARS initialization and access158 %include "CreateDPT.asm" ; For creating DPTs159 %include "FindDPT.asm" ; For finding DPTs160 %include "AccessDPT.asm" ; For accessing DPTs161 %include "BootInfo.asm" ; For creating BOOTNFO structs162 %include "AtaID.asm" ; For ATA Identify Device information163 %include "DetectDrives.asm" ; For detecting IDE drives164 %include "DetectPrint.asm" ; For printing drive detection strings165 166 ; Boot menu167 %include "BootMenu.asm" ; For Boot Menu operations168 %include "BootMenuEvent.asm" ; For menu library event handling169 %include "FloppyDrive.asm" ; Floppy Drive related functions170 %include "BootSector.asm" ; For loading boot sector171 %include "BootPrint.asm" ; For printing boot information172 %include "BootMenuPrint.asm" ; For printing Boot Menu strings173 %include "BootMenuPrintCfg.asm" ; For printing hard disk configuration174 175 ; Boot loader153 ; Libraries and data 154 %include "AssemblyLibrary.asm" 155 %include "Strings.asm" ; For BIOS message strings 156 157 ; Initialization and drive detection 158 %include "Initialize.asm" ; For BIOS initialization 159 %include "Interrupts.asm" ; For Interrupt initialization 160 %include "RamVars.asm" ; For RAMVARS initialization and access 161 %include "CreateDPT.asm" ; For creating DPTs 162 %include "FindDPT.asm" ; For finding DPTs 163 %include "AccessDPT.asm" ; For accessing DPTs 164 %include "BootInfo.asm" ; For creating BOOTNFO structs 165 %include "AtaID.asm" ; For ATA Identify Device information 166 %include "DetectDrives.asm" ; For detecting IDE drives 167 %include "DetectPrint.asm" ; For printing drive detection strings 168 169 ; Boot menu 170 %include "BootMenu.asm" ; For Boot Menu operations 171 %include "BootMenuEvent.asm" ; For menu library event handling 172 %include "FloppyDrive.asm" ; Floppy Drive related functions 173 %include "BootSector.asm" ; For loading boot sector 174 %include "BootPrint.asm" ; For printing boot information 175 %include "BootMenuPrint.asm" ; For printing Boot Menu strings 176 %include "BootMenuPrintCfg.asm" ; For printing hard disk configuration 177 178 ; Boot loader 176 179 %ifndef USE_AT 177 %include "Int19hLate.asm" ; For late initialization 178 %endif 179 %include "Int19hMenu.asm" ; For Int 19h, Boot Loader for Boot Menu 180 181 ; For all device types 182 %include "Device.asm" 183 %include "Idepack.asm" 184 %include "Timer.asm" ; For timeout and delay 185 186 ; IDE Device support 187 %include "IdeCommand.asm" 188 %include "IdeTransfer.asm" ; Must be included after IdeCommand.asm 189 %include "IdeDPT.asm" 190 %include "IdeIO.asm" 191 %include "IdeIrq.asm" 192 %include "IdeWait.asm" 193 %include "IdeError.asm" ; Must be included after IdeWait.asm 194 195 %ifdef MODULE_SERIAL 196 ; Serial Port Device support 197 %include "SerialCommand.asm" 198 %include "SerialDPT.asm" 199 %endif 200 201 ; INT 13h Hard Disk BIOS functions 202 %include "DriveXlate.asm" ; For swapping drive numbers 203 %include "Address.asm" ; For sector address translations 204 %include "CommandLookup.asm" ; For getting correct transfer command 205 %include "Int13h.asm" ; For Int 13h, Disk functions 206 %include "AH0h_HReset.asm" ; Required by Int13h_Jump.asm 207 %include "AH1h_HStatus.asm" ; Required by Int13h_Jump.asm 208 %include "AH2h_HRead.asm" ; Required by Int13h_Jump.asm 209 %include "AH3h_HWrite.asm" ; Required by Int13h_Jump.asm 210 %include "AH4h_HVerify.asm" ; Required by Int13h_Jump.asm 211 %include "AH8h_HParams.asm" ; Required by Int13h_Jump.asm 212 %include "AH9h_HInit.asm" ; Required by Int13h_Jump.asm 213 %include "AHCh_HSeek.asm" ; Required by Int13h_Jump.asm 214 %include "AHDh_HReset.asm" ; Required by Int13h_Jump.asm 215 %include "AH10h_HReady.asm" ; Required by Int13h_Jump.asm 216 %include "AH11h_HRecal.asm" ; Required by Int13h_Jump.asm 217 %include "AH15h_HSize.asm" ; Required by Int13h_Jump.asm 218 %include "AH23h_HFeatures.asm" ; Required by Int13h_Jump.asm 219 %include "AH24h_HSetBlocks.asm" ; Required by Int13h_Jump.asm 220 %include "AH25h_HDrvID.asm" ; Required by Int13h_Jump.asm 180 %include "Int19hLate.asm" ; For late initialization 181 %endif 182 %include "Int19hMenu.asm" ; For Int 19h, Boot Loader for Boot Menu 183 184 ; For all device types 185 %include "Device.asm" 186 %include "Idepack.asm" 187 %include "Timer.asm" ; For timeout and delay 188 189 ; IDE Device support 190 %include "IdeCommand.asm" 191 %include "IdeTransfer.asm" ; Must be included after IdeCommand.asm 192 %include "IdeDPT.asm" 193 %include "IdeIO.asm" 194 %include "IdeIrq.asm" 195 %include "IdeWait.asm" 196 %include "IdeError.asm" ; Must be included after IdeWait.asm 197 198 %ifdef MODULE_SERIAL ; Serial Port Device support 199 %include "SerialCommand.asm" 200 %include "SerialDPT.asm" 201 %endif 202 203 ; INT 13h Hard Disk BIOS functions 204 %include "DriveXlate.asm" ; For swapping drive numbers 205 %include "Address.asm" ; For sector address translations 206 %include "CommandLookup.asm" ; For getting correct transfer command 207 %include "Int13h.asm" ; For Int 13h, Disk functions 208 %include "AH0h_HReset.asm" ; Required by Int13h_Jump.asm 209 %include "AH1h_HStatus.asm" ; Required by Int13h_Jump.asm 210 %include "AH2h_HRead.asm" ; Required by Int13h_Jump.asm 211 %include "AH3h_HWrite.asm" ; Required by Int13h_Jump.asm 212 %include "AH4h_HVerify.asm" ; Required by Int13h_Jump.asm 213 %include "AH8h_HParams.asm" ; Required by Int13h_Jump.asm 214 %include "AH9h_HInit.asm" ; Required by Int13h_Jump.asm 215 %include "AHCh_HSeek.asm" ; Required by Int13h_Jump.asm 216 %include "AHDh_HReset.asm" ; Required by Int13h_Jump.asm 217 %include "AH10h_HReady.asm" ; Required by Int13h_Jump.asm 218 %include "AH11h_HRecal.asm" ; Required by Int13h_Jump.asm 219 %include "AH15h_HSize.asm" ; Required by Int13h_Jump.asm 220 %include "AH23h_HFeatures.asm" ; Required by Int13h_Jump.asm 221 %include "AH24h_HSetBlocks.asm" ; Required by Int13h_Jump.asm 222 %include "AH25h_HDrvID.asm" ; Required by Int13h_Jump.asm 221 223 %ifdef MODULE_EBIOS 222 %include "AH41h_CheckIfExtensionsPresent.asm"223 %include "AH42h_ExtendedReadSectors.asm"224 %include "AH43h_ExtendedWriteSectors.asm"225 %include "AH44h_ExtendedVerifySectors.asm"226 %include "AH47h_ExtendedSeek.asm"227 %include "AH48h_GetExtendedDriveParameters.asm"224 %include "AH41h_CheckIfExtensionsPresent.asm" 225 %include "AH42h_ExtendedReadSectors.asm" 226 %include "AH43h_ExtendedWriteSectors.asm" 227 %include "AH44h_ExtendedVerifySectors.asm" 228 %include "AH47h_ExtendedSeek.asm" 229 %include "AH48h_GetExtendedDriveParameters.asm" 228 230 %endif 229 231
Note:
See TracChangeset
for help on using the changeset viewer.