Changeset 152 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs


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/VariablesAndDPTs/FindDPT.asm

    r150 r152  
    7171ALIGN JUMP_ALIGN
    7272FindDPT_ToDSDIForIdeMasterAtPortDX:
    73     mov     si, FindDPT_IterateToMasterAtPortCallback
     73    mov     si, IterateToMasterAtPortCallback
    7474    jmp     SHORT IterateAllDPTs
    7575
    7676ALIGN JUMP_ALIGN
    7777FindDPT_ToDSDIForIdeSlaveAtPortDX:
    78     mov     si, FindDPT_IterateToSlaveAtPortCallback
     78    mov     si, IterateToSlaveAtPortCallback
    7979    jmp     SHORT IterateAllDPTs
    8080
     
    8383; IDE base port for Master or Slave drive.
    8484;
    85 ; FindDPT_IterateToSlaveAtPortCallback
    86 ; FindDPT_IterateToMasterAtPortCallback
     85; IterateToSlaveAtPortCallback
     86; IterateToMasterAtPortCallback
    8787;   Parameters:
    8888;       CH:     Drive number
     
    9797;--------------------------------------------------------------------
    9898ALIGN JUMP_ALIGN
    99 FindDPT_IterateToSlaveAtPortCallback:
     99IterateToSlaveAtPortCallback:
    100100    test    BYTE [di+DPT.wFlags], FLG_DPT_SLAVE ; Clears CF
    101101    jnz     SHORT CompareBasePortAddress
     
    103103
    104104ALIGN JUMP_ALIGN
    105 FindDPT_IterateToMasterAtPortCallback:
     105IterateToMasterAtPortCallback:
    106106    test    BYTE [di+DPT.wFlags], FLG_DPT_SLAVE
    107107    jnz     SHORT ReturnWrongDPT                ; Return if slave drive
     
    116116    stc                                         ; Set CF since wanted DPT
    117117    ret
     118
     119
     120;--------------------------------------------------------------------
     121; FindDPT_ToDSDIforInterruptInService
     122;   Parameters:
     123;       DS:     RAMVARS segment
     124;   Returns:
     125;       DS:DI:  Ptr to DPT
     126;       CF:     Set if wanted DPT found
     127;               Cleared if DPT not found
     128;   Corrupts registers:
     129;       SI
     130;--------------------------------------------------------------------
     131ALIGN JUMP_ALIGN
     132FindDPT_ToDSDIforInterruptInService:
     133    mov     si, IterateToDptWithInterruptInServiceFlagSet
     134    jmp     SHORT IterateAllDPTs
     135
     136;--------------------------------------------------------------------
     137; IterateToDptWithInterruptInServiceFlagSet
     138;   Parameters:
     139;       DS:DI:  Ptr to DPT to examine
     140;   Returns:
     141;       CF:     Set if wanted DPT found
     142;               Cleared if wrong DPT
     143;   Corrupts registers:
     144;       Nothing
     145;--------------------------------------------------------------------
     146ALIGN JUMP_ALIGN
     147IterateToDptWithInterruptInServiceFlagSet:
     148    test    WORD [di+DPT.wFlags], FLG_DPT_INTERRUPT_IN_SERVICE
     149    jz      SHORT ReturnWrongDPT
     150    stc                                     ; Set CF since wanted DPT
     151    ret
    118152ReturnWrongDPT:
    119     clc                                         ; Clear CF since wrong DPT
     153    clc                                     ; Clear CF since wrong DPT
    120154    ret
    121155
     
    126160; IterateAllDPTs
    127161;   Parameters:
    128 ;       BX,DX:  Parameters to callback function
    129 ;       CS:SI:  Ptr to callback function
    130 ;       DS:     RAMVARS segment
     162;       AX,BX,DX:   Parameters to callback function
     163;       CS:SI:      Ptr to callback function
     164;       DS:         RAMVARS segment
    131165;   Returns:
    132 ;       DS:DI:  Ptr to wanted DPT (if found)
    133 ;       CF:     Set if wanted DPT found
    134 ;               Cleared if DPT not found
     166;       DS:DI:      Ptr to wanted DPT (if found)
     167;       CF:         Set if wanted DPT found
     168;                   Cleared if DPT not found
    135169;   Corrupts registers:
    136170;       Nothing unless corrupted by callback function
     
    141175    mov     cx, [RAMVARS.wDrvCntAndFirst]
    142176    jcxz    .AllDptsIterated            ; Return if no drives
    143     call    FindDPT_PointToFirstDPT     ; Point DS:DI to first DPT
     177    mov     di, RAMVARS_size            ; Point DS:DI to first DPT
    144178ALIGN JUMP_ALIGN
    145179.LoopWhileDPTsLeft:
     
    155189    pop     cx
    156190    ret
    157 
    158 
    159 ;--------------------------------------------------------------------
    160 ; Sets DI to point to first Disk Parameter Table.
    161 ;
    162 ; FindDPT_PointToFirstDPT
    163 ;   Parameters:
    164 ;       Nothing
    165 ;   Returns:
    166 ;       DI:     Offset to first DPT (even if unused)
    167 ;   Corrupts registers:
    168 ;       Nothing
    169 ;--------------------------------------------------------------------
    170 ALIGN JUMP_ALIGN
    171 FindDPT_PointToFirstDPT:
    172     mov     di, RAMVARS_size
    173     ret
Note: See TracChangeset for help on using the changeset viewer.