Changeset 152 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIrq.asm


Ignore:
Timestamp:
May 1, 2011, 10:42:58 AM (13 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Changes to XTIDE Universal BIOS:

  • XTIDE mod should now be supported (untested).
  • Interrupt Service Routine no longer requires variable from RAMVARS.
  • Some small improvements.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIrq.asm

    r150 r152  
    5050
    5151;--------------------------------------------------------------------
    52 ; IdeIrq_SetInServiceDPTandClearTaskFlag
    53 ;   Parameters:
    54 ;       DS:DI:  Ptr to DPT (in RAMVARS segment)
    55 ;   Returns:
    56 ;       Nothing
    57 ;   Corrupts registers:
    58 ;       AX
    59 ;--------------------------------------------------------------------
    60 ALIGN JUMP_ALIGN
    61 IdeIrq_SetInServiceDPTandClearTaskFlag:
    62     mov     [RAMVARS.pInServiceDPT], di
    63     push    ds
    64     LOAD_BDA_SEGMENT_TO ds, ax, !       ; Also zero AX
    65     mov     [BDA.bHDTaskFlg], al
    66     pop     ds
    67     ret
    68 
    69 
    70 ;--------------------------------------------------------------------
    7152; IDE Interrupt Service Routines.
    7253;
     
    8667    call    AcknowledgeIdeInterruptAndSetTaskFlag
    8768
    88     mov     al, CMD_END_OF_INTERRUPT
     69    mov     al, COMMAND_END_OF_INTERRUPT
    8970    jmp     SHORT AcknowledgeMasterInterruptController
    9071
     
    9677    call    AcknowledgeIdeInterruptAndSetTaskFlag
    9778
    98     mov     al, CMD_END_OF_INTERRUPT    ; Load EOI command to AL
    99     out     WPORT_8259SL_COMMAND, al    ; Acknowledge Slave 8259
     79    mov     al, COMMAND_END_OF_INTERRUPT
     80    out     SLAVE_8259_COMMAND_out, al  ; Acknowledge Slave 8259
    10081AcknowledgeMasterInterruptController:
    101     out     WPORT_8259MA_COMMAND, al    ; Acknowledge Master 8259
     82    out     MASTER_8259_COMMAND_out, al ; Acknowledge Master 8259
    10283
    10384    ; Issue Int 15h, function AX=9100h (Interrupt ready)
     
    122103AcknowledgeIdeInterruptAndSetTaskFlag:
    123104    push    ds
     105    push    si
    124106    push    dx
    125107    push    bx
     
    127109    ; Reading Status Register acknowledges IDE interrupt
    128110    call    RamVars_GetSegmentToDS
    129     mov     di, [RAMVARS.pInServiceDPT]     ; DS:DI now points to DPT
     111    call    FindDPT_ToDSDIforInterruptInService
    130112    mov     dl, STATUS_REGISTER_in
    131113    call    Device_InputToALfromIdeRegisterInDL
     114
     115    ; Clear Interrupt In-Service Flag from DPT
     116    and     WORD [di+DPT.wFlags], ~FLG_DPT_INTERRUPT_IN_SERVICE
    132117
    133118    ; Set Task Flag
     
    137122    pop     bx
    138123    pop     dx
     124    pop     si
    139125    pop     ds
    140126    ret
Note: See TracChangeset for help on using the changeset viewer.