Changeset 90 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Initialization
- Timestamp:
- Jan 27, 2011, 11:31:31 AM (14 years ago)
- google:author:
- aitotat
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Initialization
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Initialization/Initialize.asm
r33 r90 1 ; File name : Initialize.asm 2 ; Project name : IDE BIOS 3 ; Created date : 23.3.2010 4 ; Last update : 23.8.2010 5 ; Author : Tomi Tilli 1 ; Project name : XTIDE Universal BIOS 6 2 ; Description : Functions for initializing the BIOS. 7 3 … … 28 24 ePUSHA 29 25 26 LOAD_BDA_SEGMENT_TO es, ax 30 27 call Initialize_ShouldSkip 31 j c SHORT .ReturnFromRomInit28 jnz SHORT .SkipRomInitialization 32 29 33 ePUSH_T ax, .ReturnFromRomInit ; Push return address 34 test BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_LATE 35 jnz SHORT Initialize_PrepareLateInitialization 36 jmp SHORT Initialize_AndDetectDrives 37 38 ALIGN JUMP_ALIGN 39 .ReturnFromRomInit: 30 %ifdef USE_AT ; Early initialization on AT build 31 call Initialize_AndDetectDrives 32 %else ; Late initialization on XT builds 33 call Int19hLate_InitializeInt19h 34 %endif 35 .SkipRomInitialization: 40 36 ePOPA 41 37 pop ds … … 50 46 ; Initialize_ShouldSkip 51 47 ; Parameters: 48 ; ES: BDA segment 49 ; Returns: 50 ; ZF: Cleared if ROM initialization is to be skipped 51 ; Set to continue ROM initialization 52 ; Corrupts registers: 52 53 ; Nothing 53 ; Returns:54 ; CF: Set if ROM initialization is to be skipped55 ; Cleared to continue ROM initialization56 ; Corrupts registers:57 ; AX, DS58 54 ;-------------------------------------------------------------------- 59 55 ALIGN JUMP_ALIGN 60 56 Initialize_ShouldSkip: 61 sti ; Enable interrupts 62 LOAD_BDA_SEGMENT_TO ds, ax 63 mov al, [BDA.bKBFlgs1] ; Load shift flags 64 eSHR_IM al, 3 ; Set CF if CTRL is held down 57 sti ; Enable interrupts 58 test BYTE [es:BDA.bKBFlgs1], (1<<2) ; Clear ZF if CTRL is held down 65 59 ret 66 67 68 ;--------------------------------------------------------------------69 ; Installs INT 19h boot loader handler for late initialization.70 ;71 ; Initialize_PrepareLateInitialization72 ; Parameters:73 ; Nothing74 ; Returns:75 ; Nothing76 ; Corrupts registers:77 ; BX, SI, ES78 ;--------------------------------------------------------------------79 ALIGN JUMP_ALIGN80 Initialize_PrepareLateInitialization:81 LOAD_BDA_SEGMENT_TO es, bx82 mov bl, INTV_BOOTSTRAP83 mov si, Int19h_LateInitialization84 jmp Interrupts_InstallHandlerToVectorInBXFromCSSI85 60 86 61 … … 90 65 ; Initialize_AndDetectDrives 91 66 ; Parameters: 92 ; Nothing67 ; ES: BDA Segment 93 68 ; Returns: 94 69 ; Nothing … … 101 76 call RamVars_Initialize 102 77 call RamVars_GetSegmentToDS 103 LOAD_BDA_SEGMENT_TO es, ax104 78 call Interrupts_InitializeInterruptVectors 105 79 call DetectDrives_FromAllIDEControllers -
trunk/XTIDE_Universal_BIOS/Src/Initialization/Interrupts.asm
r86 r90 1 ; Project name : IDEBIOS1 ; Project name : XTIDE Universal BIOS 2 2 ; Description : Functions for initializing the BIOS. 3 3 … … 66 66 ALIGN JUMP_ALIGN 67 67 Interrupts_InitializeInt19h: 68 eMOVZX bx, [cs:ROMVARS.bBootLdrType] ; Load boot loader type 69 mov si, INTV_BOOTSTRAP ; 19h 70 xchg bx, si ; SI=Loader type, BX=19h 71 jmp [cs:si+.rgwSetupBootLoader] ; Jump to install selected loader 72 ALIGN WORD_ALIGN 73 .rgwSetupBootLoader: 74 dw .SetupBootMenuLoader ; BOOTLOADER_TYPE_MENU 75 dw .SetupSimpleLoader ; BOOTLOADER_TYPE_SIMPLE 76 dw .SetupBootMenuLoader ; reserved 77 dw .NoBootLoader ; BOOTLOADER_TYPE_NONE 78 79 ALIGN JUMP_ALIGN 80 .NoBootLoader: 81 test BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_LATE 82 jnz SHORT .SetupSimpleLoader ; Boot loader required for late initialization 83 ret 84 ALIGN JUMP_ALIGN 85 .SetupSimpleLoader: 86 mov si, Int19h_SimpleBootLoader 87 jmp Interrupts_InstallHandlerToVectorInBXFromCSSI 88 ALIGN JUMP_ALIGN 89 .SetupBootMenuLoader: 68 mov bx, INTV_BOOTSTRAP 90 69 mov si, Int19hMenu_BootLoader 91 70 jmp Interrupts_InstallHandlerToVectorInBXFromCSSI
Note:
See TracChangeset
for help on using the changeset viewer.