Changeset 145 in xtideuniversalbios for trunk


Ignore:
Timestamp:
Mar 15, 2011, 11:28:17 AM (14 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
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Src/Keyboard/Keyboard.asm

    r133 r145  
    159159    je      SHORT .Backspace
    160160    jcxz    .RejectCharacter
    161     test    al, al                              ; Clear ZF and CF
     161    clc                                         ; Clear CF (ZF is already cleared)
    162162    ret
    163163
  • trunk/Assembly_Library/Src/String/Char.asm

    r41 r145  
    116116    cmp     al, '9'                 ; Decimal digit
    117117    jbe     SHORT .ConvertToDecimalDigit
    118     sub     al, 'a'-10              ; Convert to hexadecimal integer
    119     stc
    120     ret
     118    sub     al, 'a'-'0'-10          ; Convert to hexadecimal integer
    121119ALIGN JUMP_ALIGN
    122120.ConvertToDecimalDigit:
  • trunk/Assembly_Library/makefile

    r85 r145  
    5050# Assembler preprocessor defines.                               #
    5151#################################################################
    52 DEFINES = 
     52DEFINES =
    5353DEFINES_XT = ELIMINATE_CGA_SNOW
    5454DEFINES_XTPLUS = USE_186 ELIMINATE_CGA_SNOW
     
    6969IHEADERS = $(HEADERS:%=-I%)
    7070
    71 # Path + target file to be build
     71# Path + target file to be built
    7272TARGET = $(BUILD_DIR)/$(PROG)
    7373
     
    107107# Make clean debug and release versions
    108108all: clean at xtplus xt
    109     @echo All build!
     109    @echo All done!
    110110
    111111at:
    112112    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_AT) -l"$(TARGET)_at.lst" -o"$(TARGET)_at.$(EXTENSION)"
    113     @echo AT version "$(TARGET)_at.$(EXTENSION)" build.
     113    @echo AT version "$(TARGET)_at.$(EXTENSION)" built.
    114114
    115115xtplus:
    116116    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XTPLUS) -l"$(TARGET)_xtp.lst" -o"$(TARGET)_xtp.$(EXTENSION)"
    117     @echo XT plus version "$(TARGET)_xtp.$(EXTENSION)" build.
     117    @echo XT plus version "$(TARGET)_xtp.$(EXTENSION)" built.
    118118
    119119xt:
    120120    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XT) -l"$(TARGET)_xt.lst" -o"$(TARGET)_xt.$(EXTENSION)"
    121     @echo XT version "$(TARGET)_xt.$(EXTENSION)" build.
     121    @echo XT version "$(TARGET)_xt.$(EXTENSION)" built.
    122122
    123123clean:
  • 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.
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm

    r128 r145  
    158158    cmp     dl, al                              ; Above last supported?
    159159    jae     SHORT .DriveNotHandledByThisBIOS
    160     cmp     dl, ah                              ; Below first supported?
    161     jb      SHORT .DriveNotHandledByThisBIOS
    162     xchg    ax, di
     160    cmp     ah, dl                              ; Below first supported?
     161    ja      SHORT .DriveNotHandledByThisBIOS
    163162    stc
    164     ret
    165163ALIGN JUMP_ALIGN
    166164.DriveNotHandledByThisBIOS:
    167165    xchg    ax, di
    168     clc
    169166    ret
    170167
  • trunk/XTIDE_Universal_BIOS/makefile

    r132 r145  
    8080IHEADERS = $(HEADERS:%=-I%)
    8181
    82 # Path + target file to be build
     82# Path + target file to be built
    8383TARGET = $(BUILD_DIR)/$(PROG)
    8484
     
    118118# Make clean debug and release versions
    119119all: clean at xtplus xt
    120     @echo All build!
     120    @echo All done!
    121121
    122122at:
    123123    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_AT) -l"$(TARGET)_at.lst" -o"$(TARGET)_at.bin"
    124     @echo AT version "$(TARGET)_at.bin" build.
     124    @echo AT version "$(TARGET)_at.bin" built.
    125125
    126126xtplus:
    127127    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XTPLUS) -l"$(TARGET)_xtp.lst" -o"$(TARGET)_xtp.bin"
    128     @echo XT plus version "$(TARGET)_xtp.bin" build.
     128    @echo XT plus version "$(TARGET)_xtp.bin" built.
    129129
    130130xt:
    131131    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XT) -l"$(TARGET)_xt.lst" -o"$(TARGET)_xt.bin"
    132     @echo XT version "$(TARGET)_xt.bin" build.
     132    @echo XT version "$(TARGET)_xt.bin" built.
    133133
    134134clean:
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Buffers.asm

    r144 r145  
    6868
    6969;--------------------------------------------------------------------
    70 ; Buffers_NewBiosWithSizeInCXandSourceInAXhasBeenLoadedForConfiguration
     70; Buffers_NewBiosWithSizeInDXCXandSourceInAXhasBeenLoadedForConfiguration
    7171;   Parameters:
    7272;       AX:     EEPROM source (FLG_CFGVARS_FILELOADED or FLG_CFGVARS_ROMLOADED)
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/EEPROM.asm

    r138 r145  
    4949    inc     bx
    5050    loop    .CheckNextEepromSize
    51     clc     ; None of the supported EEPROMs are large enough
    52     ret
     51    ret     ; Return with CF cleared (none of the supported EEPROMs are large enough)
    5352ALIGN JUMP_ALIGN
    5453.ReturnEepromSizeInCX:
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/FlashMenu.asm

    r123 r145  
    218218    call    Dialogs_DisplayErrorFromCSDX
    219219    stc
    220     ret
    221 ALIGN JUMP_ALIGN
     220ALIGN JUMP_ALIGN, ret
    222221.ImageFitsInSelectedEeprom:
    223     clc
    224222    ret
    225223
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/makefile

    r82 r145  
    5858# Assembler preprocessor defines.                               #
    5959#################################################################
    60 DEFINES = 
     60DEFINES =
    6161DEFINES_XT = ELIMINATE_CGA_SNOW
    6262DEFINES_XTPLUS = USE_186 ELIMINATE_CGA_SNOW
     
    7777IHEADERS = $(HEADERS:%=-I%)
    7878
    79 # Path + target file to be build
     79# Path + target file to be built
    8080TARGET = $(BUILD_DIR)/$(PROG)
    8181
     
    111111############################################
    112112
    113 .PHONY: all at xtplus xt clean
     113.PHONY: all at xtplus xt clean release
    114114
    115115# Make clean debug and release versions
    116116all: clean xt
    117     @echo All build!
     117    @echo All done!
    118118
    119119at:
    120120    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_AT) -l"$(TARGET)_at.lst" -o"$(TARGET)_at.$(EXTENSION)"
    121     @echo AT version "$(TARGET)_at.$(EXTENSION)" build.
     121    @echo AT version "$(TARGET)_at.$(EXTENSION)" built.
    122122
    123123xtplus:
    124124    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XTPLUS) -l"$(TARGET)_xtp.lst" -o"$(TARGET)_xtp.$(EXTENSION)"
    125     @echo XT plus version "$(TARGET)_xtp.$(EXTENSION)" build.
     125    @echo XT plus version "$(TARGET)_xtp.$(EXTENSION)" built.
    126126
    127127xt:
    128128    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XT) -l"$(TARGET)_xt.lst" -o"$(TARGET).$(EXTENSION)"
    129     @echo XT version "$(TARGET).$(EXTENSION)" build.
     129    @echo XT version "$(TARGET).$(EXTENSION)" built.
    130130
    131131clean:
    132132    @$(RM) $(BUILD_DIR)\*.*
    133133    @echo Deleted "(*.*)" from "$(BUILD_DIR)/"
     134
     135release: xt
     136    @echo Compressing with UPX...
     137    @upx -qq --8086 --ultra-brute $(TARGET).$(EXTENSION)
     138    @echo Done! XT version is ready for release.
Note: See TracChangeset for help on using the changeset viewer.