Ignore:
Timestamp:
Mar 19, 2011, 8:09:41 PM (13 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Changes to XTIDE Universal BIOS:

  • INT 13h optimizations to save almost 100 bytes.
File:
1 edited

Legend:

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

    r88 r148  
    44; Section containing code
    55SECTION .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;--------------------------------------------------------------------
     22ALIGN JUMP_ALIGN
     23HDrvSel_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
    631
    732;--------------------------------------------------------------------
     
    81106    out     dx, al                          ; Output Device Control byte
    82107    ret
    83 
    84 
    85 ;--------------------------------------------------------------------
    86 ; Selects Master or Slave drive and disables interrupts. Interrupts should
    87 ; be disabled for commands that do not transfer data.
    88 ; This function returns after drive is ready to accept commands.
    89 ;
    90 ; HDrvSel_SelectDriveAndDisableIRQ
    91 ;   Parameters:
    92 ;       DS:DI:  Ptr to DPT
    93 ;   Returns:
    94 ;       AH:     BIOS Error code
    95 ;       CF:     0 if drive selected successfully
    96 ;               1 if any error
    97 ;   Corrupts registers:
    98 ;       AL
    99 ;--------------------------------------------------------------------
    100 ALIGN JUMP_ALIGN
    101 HDrvSel_SelectDriveAndDisableIRQ:
    102     push    bx
    103     mov     al, [di+DPT.bDrvCtrl]   ; Load Device Control Byte
    104     or      al, FLG_IDE_CTRL_nIEN   ; Disable interrupts
    105     call    HDrvSel_SelectDriveAndSetControlByte
    106     pop     bx
    107     ret
Note: See TracChangeset for help on using the changeset viewer.