Changeset 294 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools


Ignore:
Timestamp:
Mar 4, 2012, 1:35:10 AM (13 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Commit 2/2 (BIOS):

  • Fixed a bug in AH1h_HStatus.asm.
  • Minor optimizations.
  • Fixed spelling and did some cleaning.
Location:
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools
Files:
2 edited

Legend:

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

    r230 r294  
    128128ConvertLCHStoLBARegisterValues:
    129129    ; cylToSeek*headsPerCyl (18-bit result)
    130     mov     ax, cx                  ; Copy Cylinder number to AX
    131     ; We could save a byte here by using CWD instead of the XOR DH, DH in eMOVZX
    132     ; but I'm not sure how that would affect speed.
     130    mov     ax, LBA_ASSIST_SPT      ; Load Sectors per Track
     131    xchg    cx, ax                  ; Cylinder number to AX, Sectors per Track to CX
    133132
    134     eMOVZX  dx, BYTE [di+DPT.bLbaHeads]
     133%ifdef USE_386
     134    movzx   dx, [di+DPT.bLbaHeads]
     135%else
     136    cwd
     137    mov     dl, [di+DPT.bLbaHeads]
     138%endif
    135139    mul     dx                      ; DX:AX = cylToSeek*headsPerCyl
    136140
     
    141145
    142146    ; *=sectPerTrack (18-bit by 6-bit multiplication with 24-bit result)
    143     mov     cx, LBA_ASSIST_SPT      ; Load Sectors per Track
    144147    xchg    ax, dx                  ; Hiword to AX, loword to DX
    145148    mul     cl                      ; AX = hiword * Sectors per Track
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Prepare.asm

    r221 r294  
    3434    cmp     ax, BYTE 127
    3535    ja      SHORT InvalidNumberOfSectorsRequested
    36     ; Fall to GetEbiosCommandIndexToBX
    3736
    38 ;--------------------------------------------------------------------
    39 ; GetEbiosCommandIndexToBX
    40 ;   Parameters:
    41 ;       DS:DI:  Ptr to DPT
    42 ;       ES:SI:  Ptr to DAP (Disk Address Packet)
    43 ;   Returns:
    44 ;       BX:     Index to command lookup table
    45 ;   Corrupts registers:
    46 ;       AX, DX
    47 ;--------------------------------------------------------------------
    48 GetEbiosCommandIndexToBX:
     37    ; Get EBIOS command index to BX
    4938    ; LBA28 or LBA48 command
    50     xor     dx, dx
     39    cwd
    5140    mov     al, [es:si+DAP.qwLBA+3] ; Load LBA48 byte 3 (bits 24...31)
    52     and     ax, 00F0h               ; Clear LBA28 bits 24...27
     41    and     al, 0F0h                ; Clear LBA28 bits 24...27
    5342    or      ax, [es:si+DAP.qwLBA+4] ; Set bits from LBA bytes 4 and 5
    5443    cmp     dx, ax                  ; Set CF if any of bits 28...47 set
Note: See TracChangeset for help on using the changeset viewer.