Changeset 145 in xtideuniversalbios for trunk/Configurator


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.

Location:
trunk/Configurator
Files:
4 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
  • trunk/Configurator/Src/MenuPageItem.asm

    r2 r145  
    1 ; File name     :   MenuPageItem.asm
    21; Project name  :   XTIDE Univeral BIOS Configurator
    3 ; Created date  :   15.4.2010
    4 ; Last update   :   1.5.2010
    5 ; Author        :   Tomi Tilli
    62; Description   :   Functions to access MENUPAGEITEM structs.
    73
     
    363359MainPageItem_ActivateSubmenuForGettingLookupValueWithoutMarkingUnsaved:
    364360    call    MainPageItem_ActivateSubmenu
    365     cmp     cx, BYTE 0
    366     jl      SHORT .Return                       ; User cancellation
     361    test    cx, cx                              ; Clears CF
     362    js      SHORT .Return                       ; User cancellation
    367363    push    si
    368364    mov     si, [di+MENUPAGEITEM.pSubMenuPage]  ; DS:SI points to value MENUPAGE
     
    374370    pop     si
    375371    stc                                         ; Changes so redraw
    376     ret
    377372.Return:
    378     clc
    379373    ret
    380374
  • trunk/Configurator/Src/Menupages/FlashMenu.asm

    r2 r145  
    1 ; File name     :   FlashMenu.asm
    21; Project name  :   XTIDE Univeral BIOS Configurator
    3 ; Created date  :   29.4.2010
    4 ; Last update   :   2.5.2010
    5 ; Author        :   Tomi Tilli
    62; Description   :   Flash menu.
    73
     
    143139    mov     [g_cfgVars+CFGVARS.bPageSize], al
    144140    stc
    145     ret
    146141.Cancel:
    147     clc
    148142    ret
    149143
     
    306300;   Corrupts registers:
    307301;       AX, BX, CX, DX
    308 ;--------------------------------------------------------------------   
     302;--------------------------------------------------------------------
    309303ALIGN JUMP_ALIGN
    310304FlashMenu_FlashAllPagesBeforeUpdate:
  • trunk/Configurator/makefile

    r81 r145  
    5959IHEADERS += -I.
    6060
    61 # Path + target file to be build
     61# Path + target file to be built
    6262TARGET = $(BUILD_DIR)\$(PROG).com
    6363
     
    9393############################################
    9494
    95 .PHONY: all clean build
     95.PHONY: all clean build release
    9696
    9797# Make clean debug and release versions
     
    9999    @$(MAKE) clean
    100100    @$(MAKE) build
    101     @echo All build!
     101    @echo All done!
    102102
    103103# Clean
     
    109109build:
    110110    @$(AS) "$(SRC_ASM)" $(ASFLAGS) -l"$(BUILD_DIR)\$(PROG).lst" -o"$(TARGET)"
    111     @echo "$(TARGET)" build.
     111    @echo "$(TARGET)" built.
     112
     113release: build
     114    @echo Compressing with UPX...
     115    @upx -qq --8086 --ultra-brute $(TARGET)
     116    @echo Done! $(TARGET) is ready for release.
Note: See TracChangeset for help on using the changeset viewer.