Ignore:
Timestamp:
Nov 13, 2011, 3:38:40 PM (12 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes to all parts of the project:

  • Size optimizations.
  • Added a define (EXCLUDE_FROM_XTIDECFG) to exclude unused library code from XTIDECFG.
  • Tried to minimize time spent with interrupts disabled.
  • Some minor attempts to improve speed (reordering instructions etc).
  • Tried to improve readability, did some cleanup and fixed some errors in comments.
File:
1 edited

Legend:

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

    r173 r181  
    7878    ; Only need to limit sectors for LBA assist
    7979    test    BYTE [di+DPT.bFlagsLow], FLG_DRVNHEAD_LBA
    80     jnz     SHORT .ReturnLbaAssistedLCHS
     80    jz      SHORT AccessDPT_ShiftPCHinBXDXtoLCH
    8181
    82     ; P-CHS to L-CHS translation when necessary
    83     jmp     SHORT AccessDPT_ShiftPCHinBXDXtoLCH
     82    cmp     WORD [di+DPT.dwCylinders+2], BYTE 0
     83    jnz     SHORT .Return_MAX_LCHS_CYLINDERS
    8484
    85 .ReturnLbaAssistedLCHS:
    86     cmp     WORD [di+DPT.dwCylinders+2], BYTE 0
    87     jz      SHORT .LimitCylindersTo1024
     85    ; Limit cylinders to 1024
     86    cmp     bx, MAX_LCHS_CYLINDERS
     87    jb      SHORT .Return
     88ALIGN JUMP_ALIGN
     89.Return_MAX_LCHS_CYLINDERS:
    8890    mov     bx, MAX_LCHS_CYLINDERS
    89 .LimitCylindersTo1024:
    90     MIN_U   bx, MAX_LCHS_CYLINDERS
     91ALIGN JUMP_ALIGN, ret
     92.Return:
    9193    ret
    9294
     
    114116    jmp     SHORT .ShiftLoop
    115117.LimitHeadsTo255:                       ; DOS does not support drives with 256 heads
    116     sub     dl, dh                      ; BH set only when 256 logical heads
     118    sub     dl, dh                      ; DH set only when 256 logical heads
    117119    xor     dh, dh
    118120    ret
Note: See TracChangeset for help on using the changeset viewer.