Changeset 241 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Strings.asm


Ignore:
Timestamp:
Feb 9, 2012, 11:08:59 AM (12 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

Space optimizations in the Boot Menu and BootInfo routines, taking advantage of nested %s. Optimization in the init of RamVars to avoid writing the signature twice. Preparing for addition of serial floppy support, starting to break the assumption that our drives are always 80h or higher.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Strings.asm

    r233 r241  
    88; Section containing code
    99SECTION .text
    10 
    11 ; POST drive detection strings
    12 g_szRomAt:      db  "%s @ %x",LF,CR,NULL
    1310
    1411; The following strings are used by DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP
     
    2926%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS               
    3027%if ((g_szDetectEnd-$$) & 0xff00) <> ((g_szDetectStart-$$) & 0xff00)
    31 %error "g_szDetect* strings must be on the same 256 byte page, required by DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP.  Please move this block up or down within strings.asm"
    32 %endif
    33 %endif             
     28%error "g_szDetect* strings must start on the same 256 byte page, required by DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP.  Please move this block up or down within strings.asm"
     29%endif
     30%endif
     31
     32; Boot Menu menuitem strings
     33;
     34; The following strings are used by BootMenuPrint_* routines.
     35; To support optimizations in that code, these strings must start on the same 256 byte page,
     36; which is checked at assembly time below.
     37;       
     38g_szBootMenuPrintStart:
     39g_szDriveNum:           db  "%x %s",NULL
     40g_szDriveNumBOOTNFO:    db  "%x %z",NULL
     41g_szFloppyDrv:          db  "Floppy Drive %c",NULL
     42g_szBootMenuPrintEnd:   
     43g_szForeignHD:          db  "Foreign Hard Disk",NULL
     44
     45%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS               
     46%if ((g_szBootMenuPrintStart-$$) & 0xff00) <> ((g_szBootMenuPrintEnd-$$) & 0xff00)
     47%error "g_szBootMenuPrint* strings must start on the same 256 byte page, required by the BootMenuPrint_* routines.  Please move this block up or down within strings.asm"
     48%endif
     49%endif
     50
     51; POST drive detection strings
     52g_szRomAt:      db  "%s @ %x",LF,CR,NULL
    3453               
    3554; Boot loader strings
     
    4463g_szRomBoot:    db  "ROM Boot",NULL
    4564g_szHotkey:     db  "%A%c%c%A%s%A ",NULL
    46 
    47 
    48 ; Boot Menu menuitem strings
    49 g_szDriveNum:   db  "%x ",NULL
    50 g_szFDLetter:   db  "%s %c",NULL
    51 g_szFloppyDrv:  db  "Floppy Drive",NULL
    52 g_szforeignHD:  db  "Foreign Hard Disk",NULL
    53 
     65               
    5466; Boot Menu information strings
    55 g_szCapacity:   db  "Capacity : ",NULL
    56 g_szSizeSingle: db  "%s%u.%u %ciB",NULL
    57 g_szSizeDual:   db  "%s%5-u.%u %ciB /%5-u.%u %ciB",LF,CR,NULL
    58 g_szCfgHeader:  db  "Addr.",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",  SINGLE_VERTICAL,"IRQ",  SINGLE_VERTICAL,"Reset",LF,CR,NULL
    59 g_szCfgFormat:  db  "%s"   ,SINGLE_VERTICAL,"%5-u", SINGLE_VERTICAL,"%s",SINGLE_VERTICAL," %2-I",SINGLE_VERTICAL,"%5-x",  NULL
    60        
     67g_szCapacity:           db  "Capacity : %s",NULL
     68g_szCapacityNum:        db  "%5-u.%u %ciB",NULL     
     69g_szSizeDual:           db  "%s /%s",LF,CR
     70    db  "Addr.",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",SINGLE_VERTICAL,  "IRQ",SINGLE_VERTICAL,"Reset",LF,CR
     71    db     "%s",SINGLE_VERTICAL, "%5-u",SINGLE_VERTICAL, "%s",SINGLE_VERTICAL," %2-I",SINGLE_VERTICAL,"%5-x" ,NULL
     72
     73; Boot Menu Floppy Disk strings
     74;
     75; The following strings are used by BootMenuPrint_RefreshInformation
     76; To support optimizations in that code, these strings must start on the same 256 byte page,
     77; which is checked at assembly time below.
     78;               
     79g_szFddStart:   
     80g_szFddUnknown: db  "Unknown",NULL
     81g_szFddSizeOr:  db  "5",ONE_QUARTER,QUOTATION_MARK," or 3",ONE_HALF,QUOTATION_MARK," DD",NULL
     82g_szFddSize:    db  "%s",QUOTATION_MARK,", %u kiB",NULL ; 3½", 1440 kiB
     83g_szFddThreeHalf:       db  "3",ONE_HALF,NULL
     84g_szFddEnd:     
     85g_szFddFiveQuarter:     db  "5",ONE_QUARTER,NULL
     86
     87%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS               
     88%if ((g_szFddStart-$$) & 0xff00) <> ((g_szFddEnd-$$) & 0xff00)
     89%error "g_szFdd* strings must start on the same 256 byte page, required by the BootMenuPrint_RefreshInformation routines for floppy drives.  Please move this block up or down within strings.asm"
     90%endif
     91%endif                     
     92
    6193g_szAddressingModes:                   
    6294g_szLCHS:       db  "L-CHS",NULL
     
    83115%endif     
    84116       
    85 g_szFddUnknown: db  "%sUnknown",NULL
    86 g_szFddSizeOr:  db  "%s5",ONE_QUARTER,QUOTATION_MARK," or 3",ONE_HALF,QUOTATION_MARK," DD",NULL
    87 g_szFddSize:    db  "%s%s",QUOTATION_MARK,", %u kiB",NULL   ; 3½", 1440 kiB
    88 
    89 g_szFddThreeHalf:       db  "3",ONE_HALF,NULL
    90 g_szFddFiveQuarter:     db  "5",ONE_QUARTER,NULL       
    91 g_szFddThreeFive_Displacement equ (g_szFddFiveQuarter - g_szFddThreeHalf)
    92 
    93117g_szBusTypeValues:     
    94118g_szBusTypeValues_8Dual:        db      "D8 ",NULL
     
    152176;$translate{200}      = 18;    # DOUBLE_BOTTOM_LEFT_CORNER
    153177;$translate{181}      = 19;    # DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL
    154 ;$translate{ord('0')} = 20;    # DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL     
     178;$translate{ord('0')} = 20;
    155179;
    156180; Formats begin immediately after the last Translated character (they are in the same table)
     
    167191;$format{"2-u"} = 28;        # must be even
    168192;$format{"A"}   = 29;        # n/a
    169 ;$format{"s"}   = 30;        # n/a     
     193;$format{"s"}   = 30;        # n/a, normal string from DS
     194;$format{"z"}   = 31;        # n/a, boot string from BDA
    170195;
    171196; NOTE: The last $format cannot exceed 31 (stored in a 5-bit quantity).
Note: See TracChangeset for help on using the changeset viewer.