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


Ignore:
Timestamp:
Dec 15, 2012, 2:46:29 PM (11 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes:

  • Added a new define (USE_UNDOC_INTEL) that enables optimizations possible by using undocumented instructions available on all Intel processors and truly compatible clones. AFAIK the only exceptions are the NEC V-series and the Sony CXQ70108 processors so this option should be safe for use on the AT builds.
  • Building BIOSDRVS or the BIOS without MODULE_STRINGS_COMPRESSED would fail due to the recent code exclusions so I changed them a bit. Also fixed the mistaken change to Main.asm
  • Changed the Tandy specific info in Configuration_FullMode.txt so it matches the info in the Wiki.
  • Optimizations and fixes in general.
File:
1 edited

Legend:

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

    r489 r491  
    1313
    1414;
    15 ; XTIDE Universal BIOS and Associated Tools 
     15; XTIDE Universal BIOS and Associated Tools
    1616; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
    1717;
     
    2020; the Free Software Foundation; either version 2 of the License, or
    2121; (at your option) any later version.
    22 ; 
     22;
    2323; This program is distributed in the hope that it will be useful,
    2424; but WITHOUT ANY WARRANTY; without even the implied warranty of
    2525; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    2626; GNU General Public License for more details.
    27 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html       
    28 ;       
     27; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
     28;
    2929
    3030%ifdef MODULE_STRINGS_COMPRESSED_PRECOMPRESS
     
    3434; Section containing code
    3535SECTION .text
     36
     37; The following strings are used by DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP
     38; To support an optimization in that code, these strings must start on the same 256 byte page,
     39; which is checked at assembly time below.
     40;
     41g_szDetectStart:
     42g_szDetectMaster:       ; db    "Master",NULL
     43                        ; db     4dh,  61h,  73h,  74h,  65h,  72h,  00h    ; uncompressed
     44                          db     53h,  67h,  79h,  7ah,  6bh, 0b8h          ; compressed
     45
     46g_szDetectSlave:        ; db    "Slave ",NULL
     47                        ; db     53h,  6ch,  61h,  76h,  65h,  20h,  00h    ; uncompressed
     48                          db     59h,  72h,  67h,  7ch,  6bh,  00h          ; compressed
     49
     50g_szDetectOuter:        ; db    "%s at %s: ",NULL
     51                        ; db     25h,  73h,  20h,  61h,  74h,  20h,  25h,  73h,  3ah,  20h,  00h    ; uncompressed
     52                          db     3dh,  20h,  67h, 0fah,  3dh,  40h,  00h                            ; compressed
     53
     54%ifdef MODULE_SERIAL
     55g_szDetectCOM:          ; db    "COM%c%s",NULL
     56                        ; db     43h,  4fh,  4dh,  25h,  63h,  25h,  73h,  00h    ; uncompressed
     57                          db     49h,  55h,  53h,  3ch,  1dh                      ; compressed
     58
     59g_szDetectCOMAuto:      ; db    " Detect",NULL
     60                        ; db     20h,  44h,  65h,  74h,  65h,  63h,  74h,  00h    ; uncompressed
     61                          db     20h,  4ah,  6bh,  7ah,  6bh,  69h, 0bah          ; compressed
     62
     63g_szDetectCOMSmall:     ; db    "/%u%u00",NULL                  ; IDE Master at COM1/9600:
     64                        ; db     2fh,  25h,  75h,  25h,  75h,  30h,  30h,  00h    ; uncompressed
     65                          db     2ah,  35h,  35h,  33h,  13h                      ; compressed
     66
     67g_szDetectCOMLarge:     ; db    "/%u.%uK",NULL                  ; IDE Master at COM1/19.2K:
     68                        ; db     2fh,  25h,  75h,  2eh,  25h,  75h,  4bh,  00h    ; uncompressed
     69                          db     2ah,  35h,  29h,  35h,  91h                      ; compressed
     70
     71%endif
     72g_szDetectEnd:
     73g_szDetectPort:         ; db    "%x",NULL                       ; IDE Master at 1F0h:
     74                        ; db     25h,  78h,  00h    ; uncompressed
     75                          db     17h                ; compressed
     76
     77
     78%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
     79%if ((g_szDetectEnd-$$) & 0xff00) <> ((g_szDetectStart-$$) & 0xff00)
     80%error "g_szDetect* strings must start on the same 256 byte page, required by DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP.  Please move this block up or down within Strings.asm"
     81%endif
     82%endif
     83
    3684
    3785; POST drive detection strings
     
    4896      db     3dh,  20h, 0c6h,  37h,  39h                            ; compressed
    4997
    50     ; db    "%s",LF,CR                          ; version string 
     98    ; db    "%s",LF,CR                          ; version string
    5199    ; db     25h,  73h,  0ah,  0dh    ; uncompressed
    52100      db     3dh,  39h                ; compressed
    53101
    54     ; db  "Released under GNU GPL v2",LF,CR
    55     ; db  52h,  65h,  6ch,  65h,  61h,  73h,  65h,  64h,  20h,  75h,  6eh,  64h,  65h,  72h,  20h,  47h,  4eh,  55h,  20h,  47h,  50h,  4ch,  20h,  76h,  32h,  0ah,  0dh    ; uncompressed
    56       db  58h,  6bh,  72h,  6bh,  67h,  79h,  6bh, 0eah,  7bh,  74h,  6ah,  6bh, 0f8h,  4dh,  54h, 0dbh,  4dh,  56h, 0d2h,  7ch,  2ch,  39h                                  ; compressed
     102    ; db    "Released under GNU GPL v2",LF,CR
     103    ; db    52h,  65h,  6ch,  65h,  61h,  73h,  65h,  64h,  20h,  75h,  6eh,  64h,  65h,  72h,  20h,  47h,  4eh,  55h,  20h,  47h,  50h,  4ch,  20h,  76h,  32h,  0ah,  0dh    ; uncompressed
     104      db    58h,  6bh,  72h,  6bh,  67h,  79h,  6bh, 0eah,  7bh,  74h,  6ah,  6bh, 0f8h,  4dh,  54h, 0dbh,  4dh,  56h, 0d2h,  7ch,  2ch,  39h                                  ; compressed
    57105
    58106    ; db    LF,CR,NULL
     
    75123
    76124
    77 ; The following strings are used by DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP
    78 ; To support an optimization in that code, these strings must start on the same 256 byte page,
    79 ; which is checked at assembly time below.
    80 ;
    81 g_szDetectStart:
    82 g_szDetectMaster:       ; db    "Master",NULL
    83                         ; db     4dh,  61h,  73h,  74h,  65h,  72h,  00h    ; uncompressed
    84                           db     53h,  67h,  79h,  7ah,  6bh, 0b8h          ; compressed
    85 
    86 g_szDetectSlave:        ; db    "Slave ",NULL
    87                         ; db     53h,  6ch,  61h,  76h,  65h,  20h,  00h    ; uncompressed
    88                           db     59h,  72h,  67h,  7ch,  6bh,  00h          ; compressed
    89 
    90 g_szDetectOuter:        ; db    "%s at %s: ",NULL
    91                         ; db     25h,  73h,  20h,  61h,  74h,  20h,  25h,  73h,  3ah,  20h,  00h    ; uncompressed
    92                           db     3dh,  20h,  67h, 0fah,  3dh,  40h,  00h                            ; compressed
    93 
    94 %ifdef MODULE_SERIAL
    95 g_szDetectCOM:          ; db  "COM%c%s",NULL
    96                         ; db   43h,  4fh,  4dh,  25h,  63h,  25h,  73h,  00h    ; uncompressed
    97                           db   49h,  55h,  53h,  3ch,  1dh                      ; compressed
    98 
    99 g_szDetectCOMAuto:      ; db    " Detect",NULL
    100                         ; db     20h,  44h,  65h,  74h,  65h,  63h,  74h,  00h    ; uncompressed
    101                           db     20h,  4ah,  6bh,  7ah,  6bh,  69h, 0bah          ; compressed
    102 
    103 g_szDetectCOMSmall:     ; db    "/%u%u00",NULL                  ; IDE Master at COM1/9600:
    104                         ; db     2fh,  25h,  75h,  25h,  75h,  30h,  30h,  00h    ; uncompressed
    105                           db     2ah,  35h,  35h,  33h,  13h                      ; compressed
    106 
    107 g_szDetectCOMLarge:     ; db    "/%u.%uK",NULL                  ; IDE Master at COM1/19.2K:
    108                         ; db     2fh,  25h,  75h,  2eh,  25h,  75h,  4bh,  00h    ; uncompressed
    109                           db     2ah,  35h,  29h,  35h,  91h                      ; compressed
    110 
    111 %endif
    112 g_szDetectEnd:
    113 g_szDetectPort:         ; db    "%x",NULL                       ; IDE Master at 1F0h:
    114                         ; db     25h,  78h,  00h    ; uncompressed
    115                           db     17h                ; compressed
    116 
    117 
    118 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    119 %if ((g_szDetectEnd-$$) & 0xff00) <> ((g_szDetectStart-$$) & 0xff00)
    120 %error "g_szDetect* strings must start on the same 256 byte page, required by DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP.  Please move this block up or down within strings.asm"
    121 %endif
    122 %endif
    123 
    124125
    125126; Boot loader strings
     
    143144
    144145%ifdef MODULE_HOTKEYS
    145 
    146146; Hotkey Bar strings
    147147g_szFDD:        ; db    "FDD [%c]",NULL         ; "FDD [A]"
     
    172172
    173173%ifdef MODULE_BOOT_MENU
    174 
    175174; Boot Menu Floppy Disk strings
    176175;
     
    180179;
    181180g_szFddStart:
    182 g_szFddUnknown: ; db    "Unknown",NULL
    183                 ; db     55h,  6eh,  6bh,  6eh,  6fh,  77h,  6eh,  00h    ; uncompressed
    184                   db     5bh,  74h,  71h,  74h,  75h,  7dh, 0b4h          ; compressed
    185 
    186 g_szFddSizeOr:  ; db    "5",ONE_QUARTER,QUOTATION_MARK," or 3",ONE_HALF,QUOTATION_MARK," DD",NULL
    187                 ; db     35h, 0ach,  22h,  20h,  6fh,  72h,  20h,  33h, 0abh,  22h,  20h,  44h,  44h,  00h    ; uncompressed
    188                   db     2eh,  21h,  26h,  20h,  75h, 0f8h,  2dh,  22h,  26h,  20h,  4ah,  8ah                ; compressed
    189 
    190 g_szFddSize:    ; db    "%s",QUOTATION_MARK,", %u kiB",NULL ; 3½", 1440 kiB
    191                 ; db     25h,  73h,  22h,  2ch,  20h,  25h,  75h,  20h,  6bh,  69h,  42h,  00h    ; uncompressed
    192                   db     3dh,  26h,  27h,  20h,  35h,  20h,  71h,  6fh,  88h                      ; compressed
    193 
    194 g_szFddThreeHalf:       ; db  "3",ONE_HALF,NULL
    195                         ; db  33h, 0abh,  00h    ; uncompressed
    196                           db  2dh,  02h          ; compressed
     181g_szFddUnknown:     ; db    "Unknown",NULL
     182                    ; db     55h,  6eh,  6bh,  6eh,  6fh,  77h,  6eh,  00h    ; uncompressed
     183                      db     5bh,  74h,  71h,  74h,  75h,  7dh, 0b4h          ; compressed
     184
     185g_szFddSizeOr:      ; db    "5",ONE_QUARTER,QUOTATION_MARK," or 3",ONE_HALF,QUOTATION_MARK," DD",NULL
     186                    ; db     35h, 0ach,  22h,  20h,  6fh,  72h,  20h,  33h, 0abh,  22h,  20h,  44h,  44h,  00h    ; uncompressed
     187                      db     2eh,  21h,  26h,  20h,  75h, 0f8h,  2dh,  22h,  26h,  20h,  4ah,  8ah                ; compressed
     188
     189g_szFddSize:        ; db    "%s",QUOTATION_MARK,", %u kiB",NULL ; 3½", 1440 kiB
     190                    ; db     25h,  73h,  22h,  2ch,  20h,  25h,  75h,  20h,  6bh,  69h,  42h,  00h    ; uncompressed
     191                      db     3dh,  26h,  27h,  20h,  35h,  20h,  71h,  6fh,  88h                      ; compressed
     192
     193g_szFddThreeHalf:   ; db    "3",ONE_HALF,NULL
     194                    ; db    33h, 0abh,  00h    ; uncompressed
     195                      db    2dh,  02h          ; compressed
    197196
    198197g_szFddEnd:
    199 g_szFddFiveQuarter:     ; db  "5",ONE_QUARTER,NULL
    200                         ; db  35h, 0ach,  00h    ; uncompressed
    201                           db  2eh,  01h          ; compressed
     198g_szFddFiveQuarter: ; db    "5",ONE_QUARTER,NULL
     199                    ; db    35h, 0ach,  00h    ; uncompressed
     200                      db    2eh,  01h          ; compressed
    202201
    203202
    204203%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    205204%if ((g_szFddStart-$$) & 0xff00) <> ((g_szFddEnd-$$) & 0xff00)
    206 %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"
     205%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"
    207206%endif
    208207%endif
     
    238237%endif
    239238
     239
    240240g_szDeviceTypeValues:
    241 g_szDeviceTypeValues_16bit:     ; db        " 16",NULL
    242                                 ; db        20h,  31h,  36h,  00h    ; uncompressed
    243                                   db        20h,  2bh,  0fh          ; compressed
    244 
    245 g_szDeviceTypeValues_32bit:     ; db        " 32",NULL
    246                                 ; db        20h,  33h,  32h,  00h    ; uncompressed
    247                                   db        20h,  2dh,  0ch          ; compressed
    248 
    249 g_szDeviceTypeValues_8bit:      ; db        "  8",NULL
    250                                 ; db        20h,  20h,  38h,  00h    ; uncompressed
    251                                   db        20h,  20h,  10h          ; compressed
    252 
    253 g_szDeviceTypeValues_XTIDEr1:   ; db        "D8 ",NULL  ; Dual 8-bit
    254                                 ; db        44h,  38h,  20h,  00h    ; uncompressed
    255                                   db        4ah,  30h,  00h          ; compressed
    256 
    257 g_szDeviceTypeValues_XTIDEr2:   ; db        "X8 ",NULL  ; A0<->A3 swapped 8-bit
    258                                 ; db        58h,  38h,  20h,  00h    ; uncompressed
    259                                   db        5eh,  30h,  00h          ; compressed
    260 
    261 g_szDeviceTypeValues_XTCFpio8:  ; db        "T8 ",NULL  ; True 8-bit
    262                                 ; db        54h,  38h,  20h,  00h    ; uncompressed
    263                                   db        5ah,  30h,  00h          ; compressed
    264 
    265 g_szDeviceTypeValues_XTCFdma:   ; db        "8MA",NULL  ; DMA 8-bit
    266                                 ; db        38h,  4dh,  41h,  00h    ; uncompressed
    267                                   db        30h,  53h,  87h          ; compressed
    268 
    269 g_szDeviceTypeValues_XTCFmem:   ; db        "M8 ",NULL  ; Memory Mapped 8-bit
    270                                 ; db        4dh,  38h,  20h,  00h    ; uncompressed
    271                                   db        53h,  30h,  00h          ; compressed
    272 
    273 g_szDeviceTypeValues_JrIde:     ; db        "M8 ",NULL
    274                                 ; db        4dh,  38h,  20h,  00h    ; uncompressed
    275                                   db        53h,  30h,  00h          ; compressed
    276 
    277 g_szDeviceTypeValues_Serial:    ; db        "SER",NULL
    278                                 ; db        53h,  45h,  52h,  00h    ; uncompressed
    279                                   db        59h,  4bh,  98h          ; compressed
     241g_szDeviceTypeValues_16bit:     ; db    " 16",NULL
     242                                ; db    20h,  31h,  36h,  00h    ; uncompressed
     243                                  db    20h,  2bh,  0fh          ; compressed
     244
     245g_szDeviceTypeValues_32bit:     ; db    " 32",NULL
     246                                ; db    20h,  33h,  32h,  00h    ; uncompressed
     247                                  db    20h,  2dh,  0ch          ; compressed
     248
     249g_szDeviceTypeValues_8bit:      ; db    "  8",NULL
     250                                ; db    20h,  20h,  38h,  00h    ; uncompressed
     251                                  db    20h,  20h,  10h          ; compressed
     252
     253g_szDeviceTypeValues_XTIDEr1:   ; db    "D8 ",NULL  ; Dual 8-bit
     254                                ; db    44h,  38h,  20h,  00h    ; uncompressed
     255                                  db    4ah,  30h,  00h          ; compressed
     256
     257g_szDeviceTypeValues_XTIDEr2:   ; db    "X8 ",NULL  ; A0<->A3 swapped 8-bit
     258                                ; db    58h,  38h,  20h,  00h    ; uncompressed
     259                                  db    5eh,  30h,  00h          ; compressed
     260
     261g_szDeviceTypeValues_XTCFpio8:  ; db    "T8 ",NULL  ; True 8-bit
     262                                ; db    54h,  38h,  20h,  00h    ; uncompressed
     263                                  db    5ah,  30h,  00h          ; compressed
     264
     265g_szDeviceTypeValues_XTCFdma:   ; db    "8MA",NULL  ; DMA 8-bit
     266                                ; db    38h,  4dh,  41h,  00h    ; uncompressed
     267                                  db    30h,  53h,  87h          ; compressed
     268
     269g_szDeviceTypeValues_XTCFmem:   ; db    "M8 ",NULL  ; Memory Mapped 8-bit
     270                                ; db    4dh,  38h,  20h,  00h    ; uncompressed
     271                                  db    53h,  30h,  00h          ; compressed
     272
     273g_szDeviceTypeValues_JrIde:     ; db    "M8 ",NULL
     274                                ; db    4dh,  38h,  20h,  00h    ; uncompressed
     275                                  db    53h,  30h,  00h          ; compressed
     276
     277g_szDeviceTypeValues_Serial:    ; db    "SER",NULL
     278                                ; db    53h,  45h,  52h,  00h    ; uncompressed
     279                                  db    59h,  4bh,  98h          ; compressed
    280280
    281281
     
    317317%endif
    318318
    319 g_szSelectionTimeout:   ; db        DOUBLE_BOTTOM_LEFT_CORNER,DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL,"%ASelection in %2-u s",NULL
    320                         ; db        0c8h, 0b5h,  25h,  41h,  53h,  65h,  6ch,  65h,  63h,  74h,  69h,  6fh,  6eh,  20h,  69h,  6eh,  20h,  25h,  32h,  2dh,  75h,  20h,  73h,  00h    ; uncompressed
    321                           db         31h,  32h,  3bh,  59h,  6bh,  72h,  6bh,  69h,  7ah,  6fh,  75h, 0f4h,  6fh, 0f4h,  3ah,  20h, 0b9h                                              ; compressed
    322 
     319
     320g_szSelectionTimeout:   ; db    DOUBLE_BOTTOM_LEFT_CORNER,DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL,"%ASelection in %2-u s",NULL
     321                        ; db    0c8h, 0b5h,  25h,  41h,  53h,  65h,  6ch,  65h,  63h,  74h,  69h,  6fh,  6eh,  20h,  69h,  6eh,  20h,  25h,  32h,  2dh,  75h,  20h,  73h,  00h    ; uncompressed
     322                          db     31h,  32h,  3bh,  59h,  6bh,  72h,  6bh,  69h,  7ah,  6fh,  75h, 0f4h,  6fh, 0f4h,  3ah,  20h, 0b9h                                              ; compressed
    323323
    324324
     
    337337                          db     3dh,  39h                ; compressed
    338338
    339     ; db    "Addr. ",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",SINGLE_VERTICAL,  "IRQ",SINGLE_VERTICAL,"Reset",LF,CR
     339    ; db    "Addr. ",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",SINGLE_VERTICAL,"IRQ",SINGLE_VERTICAL,"Reset",LF,CR
    340340    ; db     41h,  64h,  64h,  72h,  2eh,  20h, 0b3h,  42h,  6ch,  6fh,  63h,  6bh, 0b3h,  42h,  75h,  73h, 0b3h,  49h,  52h,  51h, 0b3h,  52h,  65h,  73h,  65h,  74h,  0ah,  0dh    ; uncompressed
    341341      db     47h,  6ah,  6ah,  78h,  29h,  20h,  23h,  48h,  72h,  75h,  69h,  71h,  23h,  48h,  7bh,  79h,  23h,  4fh,  58h,  57h,  23h,  58h,  6bh,  79h,  6bh,  7ah,  39h          ; compressed
    342342
    343     ; db       "%s",SINGLE_VERTICAL, "%5-u",SINGLE_VERTICAL, "%s",SINGLE_VERTICAL," %2-I",SINGLE_VERTICAL,"%5-x" ,NULL
    344     ; db        25h,  73h, 0b3h,  25h,  35h,  2dh,  75h, 0b3h,  25h,  73h, 0b3h,  20h,  25h,  32h,  2dh,  49h, 0b3h,  25h,  35h,  2dh,  78h,  00h    ; uncompressed
    345       db        3dh,  23h,  36h,  23h,  3dh,  23h,  20h,  34h,  23h,  18h                                                                            ; compressed
     343    ; db    "%s",SINGLE_VERTICAL,"%5-u",SINGLE_VERTICAL,"%s",SINGLE_VERTICAL," %2-I",SINGLE_VERTICAL,"%5-x",NULL
     344    ; db     25h,  73h, 0b3h,  25h,  35h,  2dh,  75h, 0b3h,  25h,  73h, 0b3h,  20h,  25h,  32h,  2dh,  49h, 0b3h,  25h,  35h,  2dh,  78h,  00h    ; uncompressed
     345      db     3dh,  23h,  36h,  23h,  3dh,  23h,  20h,  34h,  23h,  18h                                                                            ; compressed
    346346
    347347
     
    374374%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    375375%if ((g_szBootMenuPrintStart-$$) & 0xff00) <> ((g_szBootMenuPrintEnd-$$) & 0xff00)
    376 %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"
     376%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"
    377377%endif
    378378%endif
     
    396396;  * There can only be 32 of these (0-31).
    397397;  * Keeping the list short is good - this translates to a table in the compressed version.
    398 ;    An error will be reported if a character or format is no longer being used by any 
     398;    An error will be reported if a character or format is no longer being used by any
    399399;    strings above.
    400400;  * Please keep items sequential for ease of further editing.
Note: See TracChangeset for help on using the changeset viewer.