Changeset 148 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Common/HDrvSel.asm
- Timestamp:
- Mar 19, 2011, 8:09:41 PM (13 years ago)
- google:author:
- aitotat
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Common/HDrvSel.asm
r88 r148 4 4 ; Section containing code 5 5 SECTION .text 6 7 ;-------------------------------------------------------------------- 8 ; Selects Master or Slave drive and disables interrupts. Interrupts should 9 ; be disabled for commands that do not transfer data. 10 ; This function returns after drive is ready to accept commands. 11 ; 12 ; HDrvSel_SelectDriveAndDisableIRQ 13 ; Parameters: 14 ; DS:DI: Ptr to DPT 15 ; Returns: 16 ; AH: BIOS Error code 17 ; CF: 0 if drive selected successfully 18 ; 1 if any error 19 ; Corrupts registers: 20 ; AL 21 ;-------------------------------------------------------------------- 22 ALIGN JUMP_ALIGN 23 HDrvSel_SelectDriveAndDisableIRQ: 24 push bx 25 mov al, [di+DPT.bDrvCtrl] ; Load Device Control Byte 26 or al, FLG_IDE_CTRL_nIEN ; Disable interrupts 27 call HDrvSel_SelectDriveAndSetControlByte 28 pop bx 29 ret 30 6 31 7 32 ;-------------------------------------------------------------------- … … 81 106 out dx, al ; Output Device Control byte 82 107 ret 83 84 85 ;--------------------------------------------------------------------86 ; Selects Master or Slave drive and disables interrupts. Interrupts should87 ; be disabled for commands that do not transfer data.88 ; This function returns after drive is ready to accept commands.89 ;90 ; HDrvSel_SelectDriveAndDisableIRQ91 ; Parameters:92 ; DS:DI: Ptr to DPT93 ; Returns:94 ; AH: BIOS Error code95 ; CF: 0 if drive selected successfully96 ; 1 if any error97 ; Corrupts registers:98 ; AL99 ;--------------------------------------------------------------------100 ALIGN JUMP_ALIGN101 HDrvSel_SelectDriveAndDisableIRQ:102 push bx103 mov al, [di+DPT.bDrvCtrl] ; Load Device Control Byte104 or al, FLG_IDE_CTRL_nIEN ; Disable interrupts105 call HDrvSel_SelectDriveAndSetControlByte106 pop bx107 ret
Note: See TracChangeset
for help on using the changeset viewer.