Changeset 264 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS


Ignore:
Timestamp:
Feb 24, 2012, 11:12:00 AM (13 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

Corrected a bug where the initial pointer to idevars0 was not properly set.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm

    r262 r264  
    4747       
    4848    call    ResetForeignHardDisks
    49     call    AH0h_ResetHardDisksHandledByOurBIOS
     49
     50    ; Resetting our hard disks will modify dl and bl such that this call must be the last in the list
     51    ;
     52    call    AH0h_ResetHardDisksHandledByOurBIOS         
     53
    5054.SkipHardDiskReset:
    5155    mov     ah, bh
     
    141145ALIGN JUMP_ALIGN
    142146AH0h_ResetHardDisksHandledByOurBIOS:
    143     mov     bl, [di+DPT.bIdevarsOffset]                 ; replace drive number with Idevars pointer for comparisons
     147    mov     bl, [di+DPT.bIdevarsOffset]                 ; replace drive number with Idevars pointer for cmp with dl
     148    mov     dl, ROMVARS.ideVars0                        ; starting Idevars offset
     149
    144150    mov     cl, [cs:ROMVARS.bIdeCnt]                    ; get count of ide controllers
    145     mov     ch, 0                                       
    146     mov     dl, 0                                       ; starting Idevars offset
    147     mov     si, IterateFindFirstDPTforIdevars           ; iteration routine
     151    mov     ch, 0
     152    jcxz    .done                                       ; just in case bIdeCnt is zero (shouldn't be)
     153
     154    mov     si, IterateFindFirstDPTforIdevars           ; iteration routine (see below)
     155
    148156.loop:
    149157    call    IterateAllDPTs                              ; look for the first drive on this controller, if any
    150158    jc      .notFound
     159
    151160    call    AHDh_ResetDrive                             ; reset master and slave on that controller
    152     call    BackupErrorCodeFromTheRequestedDriveToBH    ; save error code if same controller as initial request
     161    call    BackupErrorCodeFromTheRequestedDriveToBH    ; save error code if same controller as drive from entry
     162
    153163.notFound:
    154     add     dl, IDEVARS_size                            ; move pointer forward
    155     loop    .loop                                       ; and repeat
     164    add     dl, IDEVARS_size                            ; move Idevars pointer forward
     165    loop    .loop
     166
     167.done:
    156168    ret
    157169
Note: See TracChangeset for help on using the changeset viewer.