Changeset 145 in xtideuniversalbios for trunk/Configurator/Src/BiosFile.asm


Ignore:
Timestamp:
Mar 15, 2011, 11:28:17 AM (13 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Minor size optimizations to all parts of the project (even the old Configurator).
Also added a new 'release' option to the makefiles of both versions of the Configurator. It invokes UPX and makes the Configurator programs ridiculously tiny.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Configurator/Src/BiosFile.asm

    r2 r145  
    1 ; File name     :   EEPROM.asm
    21; Project name  :   XTIDE Univeral BIOS Configurator
    3 ; Created date  :   20.4.2010
    4 ; Last update   :   21.4.2010
    5 ; Author        :   Tomi Tilli
    62; Description   :   Functions for loading and saving BIOS image file.
    73
     
    154150;               Cleared if supported size
    155151;   Corrupts registers:
    156 ;       DX
     152;       Nothing
    157153;--------------------------------------------------------------------
    158154ALIGN JUMP_ALIGN
    159155BiosFile_GetFileSizeToCX:
    160     mov     cx, [si+DTA.dwFileSize]
    161     mov     dx, [si+DTA.dwFileSize+2]
    162     test    dx, dx                      ; More than 65535 bytes?
     156    mov     cx, [si+DTA.dwFileSize+2]   ; High word of file size to CX
     157    test    cx, cx                      ; File larger than 65535 bytes? (clears CF)
     158    mov     cx, [si+DTA.dwFileSize]     ; Low word of file size to CX
    163159    jnz     SHORT .TooLargeFile
    164160    cmp     cx, MAX_EEPROM_SIZE         ; Too large?
    165161    ja      SHORT .TooLargeFile
    166     clc
    167     ret
    168 .TooLargeFile:
    169162    stc
     163.TooLargeFile:                          ; CF is always cleared when jumping to here
     164    cmc                                 ; So we invert it
    170165    ret
    171166
Note: See TracChangeset for help on using the changeset viewer.