Ignore:
Timestamp:
Jan 30, 2011, 6:43:08 PM (13 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Changes to XTIDE Universal BIOS:

  • Inlined some initialization functions.
  • Removed alignment bytes from some initialization functions.
  • Removed creation of compatible DPTs.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/Interrupts.asm

    r90 r97  
    1515;       All except segments
    1616;--------------------------------------------------------------------
    17 ALIGN JUMP_ALIGN
    1817Interrupts_InitializeInterruptVectors:
    19     call    Interrupts_InitializeInt13hAnd40h
    20     call    Interrupts_InitializeInt19h
    21     jmp     SHORT Interrupts_InitializeHardwareIrqHandlers
    22     ; Maybe all this should be inlined?
    23 
    24 
    25 ;--------------------------------------------------------------------
    26 ; Interrupts_Int13hAnd40h
     18    ; Fall to .InitializeInt13hAnd40h
     19
     20;--------------------------------------------------------------------
     21; .InitializeInt13hAnd40h
    2722;   Parameters:
    2823;       DS:     RAMVARS segment
     
    3328;       AX, BX, CX, DX, SI, DI
    3429;--------------------------------------------------------------------
    35 ALIGN JUMP_ALIGN
    36 Interrupts_InitializeInt13hAnd40h:
     30.InitializeInt13hAnd40h:
    3731    mov     ax, [es:INTV_DISK_FUNC*4]           ; Load old INT 13h offset
    3832    mov     dx, [es:INTV_DISK_FUNC*4+2]         ; Load old INT 13h segment
     
    4741    ; 40h from 13h. That system locks to infinite loop if we copy 13h to 40h.
    4842    call    FloppyDrive_IsInt40hInstalled
    49     jc      SHORT .Return
    50     mov     [es:INTV_FLOPPY_FUNC*4], ax     ; Store offset
    51     mov     [es:INTV_FLOPPY_FUNC*4+2], dx   ; Store segment
    52 .Return:
    53     ret
    54 
    55 
    56 ;--------------------------------------------------------------------
    57 ; Interrupts_InitializeInt19h
     43    jc      SHORT .InitializeInt19h
     44    mov     [es:INTV_FLOPPY_FUNC*4], ax     ; Store old INT 13h offset
     45    mov     [es:INTV_FLOPPY_FUNC*4+2], dx   ; Store old INT 13h segment
     46    ; Fall to .InitializeInt19h
     47
     48;--------------------------------------------------------------------
     49; .InitializeInt19h
    5850;   Parameters:
    5951;       DS:     RAMVARS segment
     
    6456;       BX, SI
    6557;--------------------------------------------------------------------
    66 ALIGN JUMP_ALIGN
    67 Interrupts_InitializeInt19h:
     58.InitializeInt19h:
    6859    mov     bx, INTV_BOOTSTRAP
    6960    mov     si, Int19hMenu_BootLoader
    70     jmp     Interrupts_InstallHandlerToVectorInBXFromCSSI
    71 
    72 
    73 ;--------------------------------------------------------------------
    74 ; Interrupts_InitializeHardwareIrqHandlers
     61    call    Interrupts_InstallHandlerToVectorInBXFromCSSI
     62    ; Fall to .InitializeHardwareIrqHandlers
     63
     64;--------------------------------------------------------------------
     65; .InitializeHardwareIrqHandlers
    7566;   Parameters:
    7667;       ES:     BDA and Interrupt Vector segment (zero)
     
    8071;       BX, CX, DX, SI, DI
    8172;--------------------------------------------------------------------
    82 ALIGN JUMP_ALIGN
    83 Interrupts_InitializeHardwareIrqHandlers:
     73.InitializeHardwareIrqHandlers:
    8474    call    RamVars_GetIdeControllerCountToCX
    8575    mov     di, ROMVARS.ideVars0            ; CS:SI points to first IDEVARS
    86 ALIGN JUMP_ALIGN
    8776.IdeControllerLoop:
    8877    eMOVZX  bx, BYTE [cs:di+IDEVARS.bIRQ]
     
    10392;       BX, SI
    10493;--------------------------------------------------------------------
    105 ALIGN JUMP_ALIGN
    10694.InstallLowOrHighIrqHandler:
    10795    test    bl, bl
     
    121109;       BX, SI
    122110;--------------------------------------------------------------------
    123 ;ALIGN JUMP_ALIGN
    124 ;.InstallHighIrqHandler:
     111.InstallHighIrqHandler:
    125112    add     bx, BYTE INTV_IRQ8 - 8          ; Interrupt vector number
    126113    mov     si, HIRQ_InterruptServiceRoutineForIrqs8to15
     
    137124;       BX, SI
    138125;--------------------------------------------------------------------
    139 ALIGN JUMP_ALIGN
    140126.InstallLowIrqHandler:
    141127    add     bx, BYTE INTV_IRQ0              ; Interrupt vector number
     
    155141;       BX
    156142;--------------------------------------------------------------------
    157 ALIGN JUMP_ALIGN
    158143Interrupts_InstallHandlerToVectorInBXFromCSSI:
    159144    eSHL_IM bx, 2                   ; Shift for DWORD offset
     
    172157;       AX, BX, DX
    173158;--------------------------------------------------------------------
    174 ALIGN JUMP_ALIGN
    175159Interrupts_UnmaskInterruptControllerForDriveInDSDI:
    176160    eMOVZX  bx, BYTE [di+DPT.bIdeOff]
     
    191175;       AX, DX
    192176;--------------------------------------------------------------------
    193 ;ALIGN JUMP_ALIGN
    194 ;.UnmaskHighIrqController:
     177.UnmaskHighIrqController:
    195178    sub     al, 8               ; Slave interrupt number
    196179    mov     dx, PORT_8259SL_IMR ; Load Slave Mask Register address
     
    208191;       AX, DX
    209192;--------------------------------------------------------------------
    210 ALIGN JUMP_ALIGN
    211193.UnmaskLowIrqController:
    212194    mov     dx, PORT_8259MA_IMR ; Load Mask Register address
     
    223205;       AX
    224206;--------------------------------------------------------------------
    225 ;ALIGN JUMP_ALIGN
    226207.ClearBitFrom8259MaskRegister:
    227208    push    cx
Note: See TracChangeset for help on using the changeset viewer.