Changeset 186 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS


Ignore:
Timestamp:
Nov 15, 2011, 10:35:17 AM (12 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

Initial string compression checkin. All changes are under MODULE_STRINGS_COMPRESSED, and this can still be turned off. With this checkin, the serial and ebios code can both be turned on at the same time and still we remain below the 8K boundary (barely). I still need to chekin StringsCompress.pl after some more code cleanup. The output, in StringsCompressed.asm is checked in here, and should continue be to checkin when Strings.asm is changed, for those who do not have/want to run the Perl script to recreate it.

Location:
trunk/XTIDE_Universal_BIOS
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm

    r182 r186  
    6666;       CF:     Set since menu event was handled successfully
    6767;   Corrupts registers:
    68 ;       AX
     68;       AX, DI
    6969;--------------------------------------------------------------------
    7070ALIGN JUMP_ALIGN
    7171BootMenuPrint_NullTerminatedStringFromCSSIandSetCF:
    72     push    di
    73     CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromCSSI
    74     pop     di
    75     stc
    76     ret
    77 
     72;
     73; We send all CSSI strings through the Format routine for the case of
     74; compressed strings, but this doesn't hurt in the non-compressed case either
     75; (perhaps a little slower, but shouldn't be noticeable to the user)
     76; and results in smaller code size.
     77;
     78    push    bp
     79    mov     bp,sp
     80    jmp     BootMenuPrint_FormatCSSIfromParamsInSSBP
    7881
    7982;--------------------------------------------------------------------
     
    229232    cmp     bl, FLOPPY_TYPE_525_HD
    230233    ja      .ThreeHalf
     234%if g_szFddThreeFive_Displacement = 2       
     235    inc     ax                      ; compressed string case
     236    inc     ax
     237%else
    231238    add     ax, g_szFddThreeFive_Displacement
     239%endif
    232240.ThreeHalf:     
    233241    push    ax                      ; "5 1/4" or "3 1/2"
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrintCfg.asm

    r185 r186  
    2121ALIGN JUMP_ALIGN
    2222BootMenuPrintCfg_ForOurDrive:
    23     pop     di
    2423    mov     si, g_szCfgHeader
    2524    call    BootMenuPrint_NullTerminatedStringFromCSSIandSetCF
     25    pop     di
    2626    eMOVZX  ax, BYTE [di+DPT.bIdevarsOffset]
    2727    xchg    si, ax                      ; CS:SI now points to IDEVARS
     
    9191    mov     al,g_szBusTypeValues_Displacement
    9292    mul     BYTE [cs:si+IDEVARS.bDevice]
    93     shr     ax,1
     93       
     94    shr     ax,1            ; divide by 2 since IDEVARS.bDevice is multiplied by 2
     95       
    9496    add     ax,g_szBusTypeValues
    9597    push    ax 
  • trunk/XTIDE_Universal_BIOS/Src/Main.asm

    r183 r186  
    153153    ; Libraries and data
    154154    %include "AssemblyLibrary.asm"
     155%ifdef MODULE_STRINGS_COMPRESSED
     156    %include "StringsCompressed.asm"
     157%else
    155158    %include "Strings.asm"          ; For BIOS message strings
     159%endif
    156160
    157161    ; Initialization and drive detection
  • trunk/XTIDE_Universal_BIOS/Src/Strings.asm

    r185 r186  
    11; Project name  :   XTIDE Universal BIOS
    22; Description   :   Strings and equates for BIOS messages.
     3
     4%ifdef MODULE_STRINGS_COMPRESSED_PRECOMPRESS
     5%include "Display.inc"
     6%endif
    37
    48; Section containing code
     
    1923
    2024; Boot menu bottom of screen strings
    21 g_szFDD:        db  "FDD",NULL
    22 g_szHDD:        db  "HDD",NULL
     25g_szFDD:        db  "FDD     ",NULL
     26g_szHDD:        db  "HDD     ",NULL
    2327g_szRomBoot:    db  "ROM Boot",NULL
    24 g_szHotkey:     db  "%A%c%c%A%8s%A ",NULL
     28g_szHotkey:     db  "%A%c%c%A%s%A ",NULL
    2529
    2630
     
    3438g_szCapacity:   db  "Capacity : ",NULL
    3539g_szSizeSingle: db  "%s%u.%u %ciB",NULL
    36 g_szSizeDual:   db  "%s%4-u.%u %ciB / %4-u.%u %ciB",LF,CR,NULL
     40g_szSizeDual:   db  "%s%5-u.%u %ciB /%5-u.%u %ciB",LF,CR,NULL
    3741g_szCfgHeader:  db  "Addr.",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",  SINGLE_VERTICAL,"IRQ",  SINGLE_VERTICAL,"Reset",LF,CR,NULL
    3842g_szCfgFormat:  db  "%s"   ,SINGLE_VERTICAL,"%5-u", SINGLE_VERTICAL,"%s",SINGLE_VERTICAL," %2-I",SINGLE_VERTICAL,"%5-x",  NULL
     
    98102%endif             
    99103       
    100 g_szSelectionTimeout:   db      DOUBLE_BOTTOM_LEFT_CORNER,DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL,"%ASelection in %2u s",NULL
     104g_szSelectionTimeout:   db      DOUBLE_BOTTOM_LEFT_CORNER,DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL,"%ASelection in %2-u s",NULL
    101105
    102106g_szDashForZero:        db      "- ",NULL
  • trunk/XTIDE_Universal_BIOS/makefile

    r181 r186  
    6565# Assembler preprocessor defines.                               #
    6666#################################################################
    67 DEFINES = INCLUDE_MENU_LIBRARY EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS MODULE_EBIOS MODULE_SERIAL
     67DEFINES = INCLUDE_MENU_LIBRARY EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS MODULE_EBIOS MODULE_SERIAL MODULE_STRINGS_COMPRESSED
    6868DEFINES_XT = ELIMINATE_CGA_SNOW
    6969DEFINES_XTPLUS = ELIMINATE_CGA_SNOW USE_186
     
    139139    @$(RM) $(BUILD_DIR)\*.*
    140140    @echo Deleted "(*.*)" from "$(BUILD_DIR)/"
     141
     142src\StringsCompressed.asm:  src\Strings.asm src\StringsCompress.pl
     143    $(AS) src\Strings.asm $(ASFLAGS) $(DEFS_XT) -DMODULE_STRINGS_COMPRESSED_PRECOMPRESS -o build\Strings.bin -l build\StringsPrecompress.lst
     144    perl src\StringsCompress.pl < build\StringsPrecompress.lst > src\StringsCompressed.asm
     145
     146$(SRC_ASM):     src\StringsCompressed.asm
Note: See TracChangeset for help on using the changeset viewer.