Changeset 292 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/StringsCompressed.asm


Ignore:
Timestamp:
Mar 3, 2012, 6:53:28 AM (12 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

Small optimization, moved around some serial code to avoid a few jumps and unnecessary number of sectors check.

File:
1 edited

Legend:

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

    r285 r292  
    1717SECTION .text
    1818
     19; Boot Menu Floppy Disk strings
     20;
     21; The following strings are used by BootMenuPrint_RefreshInformation
     22; To support optimizations in that code, these strings must start on the same 256 byte page,
     23; which is checked at assembly time below.
     24;
     25g_szFddStart:
     26g_szFddUnknown: ; db    "Unknown",NULL
     27                ; db     55h,  6eh,  6bh,  6eh,  6fh,  77h,  6eh,  00h    ; uncompressed
     28                  db     5bh,  74h,  71h,  74h,  75h,  7dh, 0b4h          ; compressed
     29
     30g_szFddSizeOr:  ; db    "5",ONE_QUARTER,QUOTATION_MARK," or 3",ONE_HALF,QUOTATION_MARK," DD",NULL
     31                ; db     35h, 0ach,  22h,  20h,  6fh,  72h,  20h,  33h, 0abh,  22h,  20h,  44h,  44h,  00h    ; uncompressed
     32                  db     2fh,  21h,  26h,  20h,  75h, 0f8h,  2dh,  22h,  26h,  20h,  4ah,  8ah                ; compressed
     33
     34g_szFddSize:    ; db    "%s",QUOTATION_MARK,", %u kiB",NULL ; 3½", 1440 kiB
     35                ; db     25h,  73h,  22h,  2ch,  20h,  25h,  75h,  20h,  6bh,  69h,  42h,  00h    ; uncompressed
     36                  db     3eh,  26h,  27h,  20h,  37h,  20h,  71h,  6fh,  88h                      ; compressed
     37
     38g_szFddThreeHalf:       ; db  "3",ONE_HALF,NULL
     39                        ; db   33h, 0abh,  00h    ; uncompressed
     40                          db   2dh,  02h          ; compressed
     41
     42g_szFddEnd:
     43g_szFddFiveQuarter:     ; db  "5",ONE_QUARTER,NULL
     44                        ; db   35h, 0ach,  00h    ; uncompressed
     45                          db   2fh,  01h          ; compressed
     46
     47
     48%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
     49%if ((g_szFddStart-$$) & 0xff00) <> ((g_szFddEnd-$$) & 0xff00)
     50%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"
     51%endif
     52%endif
     53
     54; The following strings are used by DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP
     55; To support an optimization in that code, these strings must start on the same 256 byte page,
     56; which is checked at assembly time below.
     57;
     58g_szDetectStart:
     59g_szDetectMaster:       ; db    "Master",NULL
     60                        ; db     4dh,  61h,  73h,  74h,  65h,  72h,  00h    ; uncompressed
     61                          db     53h,  67h,  79h,  7ah,  6bh, 0b8h          ; compressed
     62
     63g_szDetectSlave:        ; db    "Slave ",NULL
     64                        ; db     53h,  6ch,  61h,  76h,  65h,  20h,  00h    ; uncompressed
     65                          db     59h,  72h,  67h,  7ch,  6bh,  00h          ; compressed
     66
     67g_szDetectOuter:        ; db    "IDE %s at %s: ",NULL
     68                        ; db     49h,  44h,  45h,  20h,  25h,  73h,  20h,  61h,  74h,  20h,  25h,  73h,  3ah,  20h,  00h    ; uncompressed
     69                          db     4fh,  4ah, 0cbh,  3eh,  20h,  67h, 0fah,  3eh,  40h,  00h                                  ; compressed
     70
     71%ifdef MODULE_SERIAL        ;%%; is stripped off after string compression, %ifdef won't compress properly
     72g_szDetectOuterSerial:  ; db    "Serial %s on %s: ",NULL
     73                        ; db     53h,  65h,  72h,  69h,  61h,  6ch,  20h,  25h,  73h,  20h,  6fh,  6eh,  20h,  25h,  73h,  3ah,  20h,  00h    ; uncompressed
     74                          db     59h,  6bh,  78h,  6fh,  67h, 0f2h,  3eh,  20h,  75h, 0f4h,  3eh,  40h,  00h                                  ; compressed
     75
     76g_szDetectCOM:          ; db  "COM%c%s",NULL
     77                        ; db   43h,  4fh,  4dh,  25h,  63h,  25h,  73h,  00h    ; uncompressed
     78                          db   49h,  55h,  53h,  35h,  1eh                      ; compressed
     79
     80g_szDetectCOMAuto:      ; db    " Detect",NULL
     81                        ; db     20h,  44h,  65h,  74h,  65h,  63h,  74h,  00h    ; uncompressed
     82                          db     20h,  4ah,  6bh,  7ah,  6bh,  69h, 0bah          ; compressed
     83
     84g_szDetectCOMSmall:     ; db    "/%u%u00",NULL                  ; IDE Master at COM1/9600:
     85                        ; db     2fh,  25h,  75h,  25h,  75h,  30h,  30h,  00h    ; uncompressed
     86                          db     2ah,  37h,  37h,  34h,  14h                      ; compressed
     87
     88g_szDetectCOMLarge:     ; db    "/%u.%uK",NULL                  ; IDE Master at COM1/19.2K:
     89                        ; db     2fh,  25h,  75h,  2eh,  25h,  75h,  4bh,  00h    ; uncompressed
     90                          db     2ah,  37h,  29h,  37h,  91h                      ; compressed
     91
     92%endif                      ;%%; is stripped off after string compression, %ifdef won't compress properly
     93g_szDetectEnd:
     94g_szDetectPort:         ; db    "%x",NULL                       ; IDE Master at 1F0h:
     95                        ; db     25h,  78h,  00h    ; uncompressed
     96                          db     19h                ; compressed
     97
     98
     99%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
     100%if ((g_szDetectEnd-$$) & 0xff00) <> ((g_szDetectStart-$$) & 0xff00)
     101%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"
     102%endif
     103%endif
     104
     105; Boot Menu menuitem strings
     106;
     107; The following strings are used by BootMenuPrint_* routines.
     108; To support optimizations in that code, these strings must start on the same 256 byte page,
     109; which is checked at assembly time below.
     110;
     111g_szBootMenuPrintStart:
     112g_szDriveNum:           ; db    "%x %s",NULL
     113                        ; db     25h,  78h,  20h,  25h,  73h,  00h    ; uncompressed
     114                          db     39h,  20h,  1eh                      ; compressed
     115
     116g_szDriveNumBOOTNFO:    ; db    "%x %z",NULL
     117                        ; db     25h,  78h,  20h,  25h,  7ah,  00h    ; uncompressed
     118                          db     39h,  20h,  1fh                      ; compressed
     119
     120g_szFloppyDrv:          ; db    "Floppy Drive %c",NULL
     121                        ; db     46h,  6ch,  6fh,  70h,  70h,  79h,  20h,  44h,  72h,  69h,  76h,  65h,  20h,  25h,  63h,  00h    ; uncompressed
     122                          db     4ch,  72h,  75h,  76h,  76h, 0ffh,  4ah,  78h,  6fh,  7ch, 0ebh,  15h                            ; compressed
     123
     124g_szBootMenuPrintEnd:
     125g_szForeignHD:          ; db    "Foreign Hard Disk",NULL
     126                        ; db     46h,  6fh,  72h,  65h,  69h,  67h,  6eh,  20h,  48h,  61h,  72h,  64h,  20h,  44h,  69h,  73h,  6bh,  00h    ; uncompressed
     127                          db     4ch,  75h,  78h,  6bh,  6fh,  6dh, 0f4h,  4eh,  67h,  78h, 0eah,  4ah,  6fh,  79h, 0b1h                      ; compressed
     128
     129
     130%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
     131%if ((g_szBootMenuPrintStart-$$) & 0xff00) <> ((g_szBootMenuPrintEnd-$$) & 0xff00)
     132%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"
     133%endif
     134%endif
     135
    19136; POST drive detection strings
    20137g_szRomAt:      ; db    "%s @ %x",LF,CR,NULL
     
    143260                          db         28h,  00h          ; compressed
    144261
    145 
    146 ; Boot Menu Floppy Disk strings
    147 ;
    148 ; The following strings are used by BootMenuPrint_RefreshInformation
    149 ; To support optimizations in that code, these strings must start on the same 256 byte page,
    150 ; which is checked at assembly time below.
    151 ;
    152 g_szFddStart:
    153 g_szFddUnknown: ; db    "Unknown",NULL
    154                 ; db     55h,  6eh,  6bh,  6eh,  6fh,  77h,  6eh,  00h    ; uncompressed
    155                   db     5bh,  74h,  71h,  74h,  75h,  7dh, 0b4h          ; compressed
    156 
    157 g_szFddSizeOr:  ; db    "5",ONE_QUARTER,QUOTATION_MARK," or 3",ONE_HALF,QUOTATION_MARK," DD",NULL
    158                 ; db     35h, 0ach,  22h,  20h,  6fh,  72h,  20h,  33h, 0abh,  22h,  20h,  44h,  44h,  00h    ; uncompressed
    159                   db     2fh,  21h,  26h,  20h,  75h, 0f8h,  2dh,  22h,  26h,  20h,  4ah,  8ah                ; compressed
    160 
    161 g_szFddSize:    ; db    "%s",QUOTATION_MARK,", %u kiB",NULL ; 3½", 1440 kiB
    162                 ; db     25h,  73h,  22h,  2ch,  20h,  25h,  75h,  20h,  6bh,  69h,  42h,  00h    ; uncompressed
    163                   db     3eh,  26h,  27h,  20h,  37h,  20h,  71h,  6fh,  88h                      ; compressed
    164 
    165 g_szFddThreeHalf:       ; db  "3",ONE_HALF,NULL
    166                         ; db   33h, 0abh,  00h    ; uncompressed
    167                           db   2dh,  02h          ; compressed
    168 
    169 g_szFddEnd:
    170 g_szFddFiveQuarter:     ; db  "5",ONE_QUARTER,NULL
    171                         ; db   35h, 0ach,  00h    ; uncompressed
    172                           db   2fh,  01h          ; compressed
    173 
    174 
    175 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    176 %if ((g_szFddStart-$$) & 0xff00) <> ((g_szFddEnd-$$) & 0xff00)
    177 %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"
    178 %endif
    179 %endif
    180 
    181 ; The following strings are used by DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP
    182 ; To support an optimization in that code, these strings must start on the same 256 byte page,
    183 ; which is checked at assembly time below.
    184 ;
    185 g_szDetectStart:
    186 g_szDetectMaster:       ; db    "Master",NULL
    187                         ; db     4dh,  61h,  73h,  74h,  65h,  72h,  00h    ; uncompressed
    188                           db     53h,  67h,  79h,  7ah,  6bh, 0b8h          ; compressed
    189 
    190 g_szDetectSlave:        ; db    "Slave ",NULL
    191                         ; db     53h,  6ch,  61h,  76h,  65h,  20h,  00h    ; uncompressed
    192                           db     59h,  72h,  67h,  7ch,  6bh,  00h          ; compressed
    193 
    194 g_szDetectOuter:        ; db    "IDE %s at %s: ",NULL
    195                         ; db     49h,  44h,  45h,  20h,  25h,  73h,  20h,  61h,  74h,  20h,  25h,  73h,  3ah,  20h,  00h    ; uncompressed
    196                           db     4fh,  4ah, 0cbh,  3eh,  20h,  67h, 0fah,  3eh,  40h,  00h                                  ; compressed
    197 
    198 ;%%; %ifdef MODULE_SERIAL       ;%%; is stripped off after string compression, %ifdef won't compress properly
    199 g_szDetectOuterSerial:  ; db    "Serial %s on %s: ",NULL
    200                         ; db     53h,  65h,  72h,  69h,  61h,  6ch,  20h,  25h,  73h,  20h,  6fh,  6eh,  20h,  25h,  73h,  3ah,  20h,  00h    ; uncompressed
    201                           db     59h,  6bh,  78h,  6fh,  67h, 0f2h,  3eh,  20h,  75h, 0f4h,  3eh,  40h,  00h                                  ; compressed
    202 
    203 g_szDetectCOM:          ; db  "COM%c%s",NULL
    204                         ; db   43h,  4fh,  4dh,  25h,  63h,  25h,  73h,  00h    ; uncompressed
    205                           db   49h,  55h,  53h,  35h,  1eh                      ; compressed
    206 
    207 g_szDetectCOMAuto:      ; db    " Detect",NULL
    208                         ; db     20h,  44h,  65h,  74h,  65h,  63h,  74h,  00h    ; uncompressed
    209                           db     20h,  4ah,  6bh,  7ah,  6bh,  69h, 0bah          ; compressed
    210 
    211 g_szDetectCOMSmall:     ; db    "/%u%u00",NULL                  ; IDE Master at COM1/9600:
    212                         ; db     2fh,  25h,  75h,  25h,  75h,  30h,  30h,  00h    ; uncompressed
    213                           db     2ah,  37h,  37h,  34h,  14h                      ; compressed
    214 
    215 g_szDetectCOMLarge:     ; db    "/%u.%uK",NULL                  ; IDE Master at COM1/19.2K:
    216                         ; db     2fh,  25h,  75h,  2eh,  25h,  75h,  4bh,  00h    ; uncompressed
    217                           db     2ah,  37h,  29h,  37h,  91h                      ; compressed
    218 
    219 ;%%; %endif                     ;%%; is stripped off after string compression, %ifdef won't compress properly
    220 g_szDetectEnd:
    221 g_szDetectPort:         ; db    "%x",NULL                       ; IDE Master at 1F0h:
    222                         ; db     25h,  78h,  00h    ; uncompressed
    223                           db     19h                ; compressed
    224 
    225 
    226 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    227 %if ((g_szDetectEnd-$$) & 0xff00) <> ((g_szDetectStart-$$) & 0xff00)
    228 %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"
    229 %endif
    230 %endif
    231 
    232 ; Boot Menu menuitem strings
    233 ;
    234 ; The following strings are used by BootMenuPrint_* routines.
    235 ; To support optimizations in that code, these strings must start on the same 256 byte page,
    236 ; which is checked at assembly time below.
    237 ;
    238 g_szBootMenuPrintStart:
    239 g_szDriveNum:           ; db    "%x %s",NULL
    240                         ; db     25h,  78h,  20h,  25h,  73h,  00h    ; uncompressed
    241                           db     39h,  20h,  1eh                      ; compressed
    242 
    243 g_szDriveNumBOOTNFO:    ; db    "%x %z",NULL
    244                         ; db     25h,  78h,  20h,  25h,  7ah,  00h    ; uncompressed
    245                           db     39h,  20h,  1fh                      ; compressed
    246 
    247 g_szFloppyDrv:          ; db    "Floppy Drive %c",NULL
    248                         ; db     46h,  6ch,  6fh,  70h,  70h,  79h,  20h,  44h,  72h,  69h,  76h,  65h,  20h,  25h,  63h,  00h    ; uncompressed
    249                           db     4ch,  72h,  75h,  76h,  76h, 0ffh,  4ah,  78h,  6fh,  7ch, 0ebh,  15h                            ; compressed
    250 
    251 g_szBootMenuPrintEnd:
    252 g_szForeignHD:          ; db    "Foreign Hard Disk",NULL
    253                         ; db     46h,  6fh,  72h,  65h,  69h,  67h,  6eh,  20h,  48h,  61h,  72h,  64h,  20h,  44h,  69h,  73h,  6bh,  00h    ; uncompressed
    254                           db     4ch,  75h,  78h,  6bh,  6fh,  6dh, 0f4h,  4eh,  67h,  78h, 0eah,  4ah,  6fh,  79h, 0b1h                      ; compressed
    255 
    256 
    257 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    258 %if ((g_szBootMenuPrintStart-$$) & 0xff00) <> ((g_szBootMenuPrintEnd-$$) & 0xff00)
    259 %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"
    260 %endif
    261 %endif
    262262
    263263; Boot menu bottom of screen strings
Note: See TracChangeset for help on using the changeset viewer.