Changeset 322 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Initialization
- Timestamp:
- Mar 11, 2012, 4:17:46 PM (13 years ago)
- google:author:
- krille_n_@hotmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Initialization/DriveXlate.asm
r294 r322 20 20 jz SHORT .Return ; Return if translation disabled 21 21 xchg di, ax ; Backup AX 22 call SwapFloppyDriveOrHardDisk23 xchg ax, di24 .Return:25 ret26 22 27 28 ;--------------------------------------------------------------------29 ; SwapFloppyDriveOrHardDisk30 ; Parameters:31 ; DL: Drive number to be possibly swapped32 ; DS: RAMVARS segment33 ; Returns:34 ; DL: Translated drive number35 ; Corrupts registers:36 ; AX37 ;--------------------------------------------------------------------38 ALIGN JUMP_ALIGN39 SwapFloppyDriveOrHardDisk:40 23 mov ah, 80h ; Assume hard disk 41 24 mov al, [RAMVARS.xlateVars+XLATEVARS.bHDSwap] 42 25 test dl, ah ; Hard disk? 43 jnz SHORT SwapDrive; If so, jump to swap26 jnz SHORT .SwapDrive ; If so, jump to swap 44 27 mov al, [RAMVARS.xlateVars+XLATEVARS.bFDSwap] 45 28 cbw 46 ; Fall to SwapDrive47 29 48 ;--------------------------------------------------------------------49 ; SwapDrive50 ; Parameters:51 ; AL: Drive number to swap to 00h/80h52 ; AH: 00h/80h to be swapped to stored drive number53 ; DL: Drive number to be possibly swapped54 ; Returns:55 ; DL: Translated drive number56 ; Corrupts registers:57 ; AL58 ;--------------------------------------------------------------------59 30 ALIGN JUMP_ALIGN 60 SwapDrive:61 cmp ah, dl ; Swap DL from 00h/80h to xxh?31 .SwapDrive: 32 cmp ah, dl ; Swap DL from 00h/80h to xxh? 62 33 je SHORT .SwapToXXhInAL 63 cmp al, dl ; Swap DL from xxh to 00h/80h?64 jne SHORT .Re turn34 cmp al, dl ; Swap DL from xxh to 00h/80h? 35 jne SHORT .RestoreAXandReturn 65 36 mov al, ah 66 37 ALIGN JUMP_ALIGN 67 38 .SwapToXXhInAL: 68 39 mov dl, al 40 ALIGN JUMP_ALIGN 41 .RestoreAXandReturn: 42 xchg ax, di ; Restore AX 69 43 ALIGN JUMP_ALIGN, ret 70 44 .Return:
Note:
See TracChangeset
for help on using the changeset viewer.