Changeset 181 in xtideuniversalbios for trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm


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/Assembly_Library/Src/Menu/Dialog/DialogFile.asm

    r170 r181  
    265265.FilterCurrentDirectory:
    266266    cmp     WORD [si+DTA.szFile], CURRENTDIR_CHARACTERS
    267     je      SHORT .ReturnWithFiltering
     267    je      SHORT .DoFilter
    268268    ret
    269269
     
    274274    cmp     WORD [si+DTA.szFile], UPDIR_CHARACTERS
    275275    jne     SHORT .ReturnWithoutFiltering
    276 .ReturnWithFiltering:
     276.DoFilter:
    277277    add     sp, BYTE 2      ; Remove return address from stack
    278278ALIGN JUMP_ALIGN, ret
     
    375375SortDirectoryContentsStringFromESDIwithCountInCX:
    376376    call    Registers_CopyESDItoDSSI
    377     call    .AddDirectoryContentsStringLengthToDI
    378     mov     bx, .FileStringComparator
    379     xchg    dx, cx
    380     mov     cx, FILE_STRING_LENGTH
    381     jmp     Sort_ItemsFromDSSIwithCountInDXsizeInCXandComparatorInBX
    382 
    383 ALIGN JUMP_ALIGN
    384 .AddDirectoryContentsStringLengthToDI:
     377
     378    ; Add directory contents string length to DI
    385379    mov     ax, FILE_STRING_LENGTH
     380    push    ax
    386381    mul     cx
    387382    add     di, ax
    388     ret
     383
     384    mov     dx, cx
     385    pop     cx
     386    mov     bx, .FileStringComparator
     387    jmp     Sort_ItemsFromDSSIwithCountInDXsizeInCXandComparatorInBX
    389388
    390389;--------------------------------------------------------------------
     
    395394;       ES:DI:  Ptr to second item to compare
    396395;   Returns:
    397 ;       FLAGS:  Signed comparition between first and second item
     396;       FLAGS:  Signed comparison between first and second item
    398397;   Corrupts registers:
    399398;       Nothing
Note: See TracChangeset for help on using the changeset viewer.