Changeset 126 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Initialization


Ignore:
Timestamp:
Mar 3, 2011, 6:33:01 PM (13 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes to the XTIDE Universal BIOS:

  • Minor size optimization in DriveXlate.asm
File:
1 edited

Legend:

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

    r99 r126  
    9595ALIGN JUMP_ALIGN
    9696DriveXlate_SwapFloppyDriveOrHardDisk:
    97     test    dl, 80h                         ; Hard disk?
    98     jnz     SHORT .SwapHardDisk ; If so, jump to swap
    99     ; Fall to .SwapFloppyDrive
    100 
    101 ;--------------------------------------------------------------------
    102 ; .SwapFloppyDrive
    103 ;   Parameters:
    104 ;       DL:     Drive number to be possibly swapped
    105 ;       DS:     RAMVARS segment
    106 ;   Returns:
    107 ;       DL:     Translated drive number
    108 ;   Corrupts registers:
    109 ;       AX
    110 ;--------------------------------------------------------------------
    111 .SwapFloppyDrive:
    112     eMOVZX  ax, BYTE [RAMVARS.xlateVars+XLATEVARS.bFDSwap]
    113     jmp     SHORT SwapDrive
    114 
    115 ;--------------------------------------------------------------------
    116 ; .SwapHardDisk
    117 ;   Parameters:
    118 ;       DL:     Drive number to be possibly swapped
    119 ;       DS:     RAMVARS segment
    120 ;   Returns:
    121 ;       DL:     Translated drive number
    122 ;   Corrupts registers:
    123 ;       AX
    124 ;--------------------------------------------------------------------
    125 ALIGN JUMP_ALIGN
    126 .SwapHardDisk:
    127     mov     ah, 80h
     97    mov     ah, 80h                 ; Assume hard disk
    12898    mov     al, BYTE [RAMVARS.xlateVars+XLATEVARS.bHDSwap]
     99    test    dl, ah                  ; Hard disk?
     100    jnz     SHORT SwapDrive         ; If so, jump to swap
     101    mov     al, BYTE [RAMVARS.xlateVars+XLATEVARS.bFDSwap]
     102    cbw
    129103    ; Fall to SwapDrive
    130104
     
    140114;       Nothing
    141115;--------------------------------------------------------------------
     116ALIGN JUMP_ALIGN
    142117SwapDrive:
    143118    cmp     ah, dl              ; Swap DL from 00h/80h to xxh?
Note: See TracChangeset for help on using the changeset viewer.