Changeset 231 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS


Ignore:
Timestamp:
Jan 31, 2012, 5:46:56 PM (13 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes:

  • Additional tweaks to AccessDPT_ShiftPCHinAXBLtoLCH in AccessDPT.asm
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AccessDPT.asm

    r230 r231  
    9090.ShiftLoop:
    9191    cmp     ax, MAX_LCHS_CYLINDERS      ; Need to shift?
    92     jbe     SHORT .LimitHeadsTo255      ;  If not, return
     92    jbe     SHORT .Return               ;  If not, return
    9393    inc     cx                          ; Increment shift count
    9494    shr     ax, 1                       ; Halve cylinders
    9595    shl     bl, 1                       ; Double heads
    96     jnz     SHORT .ShiftLoop
    97 .LimitHeadsTo255:                       ; DOS does not support drives with 256 heads
    98     cmp     bl, cl                      ; Set CF if BL is zero
    99     sbb     bl, ch                      ; If BL=0 then BL=255
     96    jnz     SHORT .ShiftLoop            ; Falls through only on the last (4th) iteration and only if BL was 16 on entry
     97    dec     bl                          ; DOS doesn't support drives with 256 heads so we limit heads to 255
     98    ; We can save a byte here by using DEC BX if we don't care about BH
     99.Return:
    100100    ret
    101101
Note: See TracChangeset for help on using the changeset viewer.