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


Ignore:
Timestamp:
Feb 10, 2012, 3:12:40 AM (12 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes:

  • Optimizations (both for size and speed) in IdeTransfer.asm and MemIdeTransfer.asm
  • Fixed a bug where the SingleByteRead/Write functions in IdeTransfer.asm would fail on 128 sector transfers.
  • Fixed some typos and errors in general, comments etc.
File:
1 edited

Legend:

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

    r241 r242  
    33
    44%ifdef MODULE_STRINGS_COMPRESSED_PRECOMPRESS
    5 %include "Display.inc"
     5    %include "Display.inc"
    66%endif
    77
     
    1010
    1111; The following strings are used by DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP
    12 ; To support an optimization in that code, these strings must start on the same 256 byte page, 
     12; To support an optimization in that code, these strings must start on the same 256 byte page,
    1313; which is checked at assembly time below.
    1414;
    15 g_szDetectStart:       
    16 g_szDetectMaster:       db  "Master",NULL 
     15g_szDetectStart:
     16g_szDetectMaster:       db  "Master",NULL
    1717g_szDetectSlave:        db  "Slave ",NULL
    1818g_szDetectOuter:        db  "IDE %s at %s: ",NULL
    1919g_szDetectPort:         db  "%x",NULL                       ; IDE Master at 1F0h:
    20 g_szDetectCOM:          db  "COM%c%s",NULL           
     20g_szDetectCOM:          db  "COM%c%s",NULL
    2121g_szDetectCOMAuto:      db  " Auto",NULL
    2222g_szDetectCOMSmall:     db  "/%u%u00",NULL                  ; IDE Master at COM1/9600:
    2323g_szDetectEnd:
    2424g_szDetectCOMLarge:     db  "/%u.%uK",NULL                  ; IDE Master at COM1/19.2K:
    25        
    26 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS               
    27 %if ((g_szDetectEnd-$$) & 0xff00) <> ((g_szDetectStart-$$) & 0xff00)
    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
     25
     26%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
     27    %if ((g_szDetectEnd-$$) & 0xff00) <> ((g_szDetectStart-$$) & 0xff00)
     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
    3030%endif
    3131
    3232; Boot Menu menuitem strings
    33 ; 
     33;
    3434; 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, 
     35; To support optimizations in that code, these strings must start on the same 256 byte page,
    3636; which is checked at assembly time below.
    37 ;       
    38 g_szBootMenuPrintStart: 
     37;
     38g_szBootMenuPrintStart:
    3939g_szDriveNum:           db  "%x %s",NULL
    4040g_szDriveNumBOOTNFO:    db  "%x %z",NULL
    4141g_szFloppyDrv:          db  "Floppy Drive %c",NULL
    42 g_szBootMenuPrintEnd:   
     42g_szBootMenuPrintEnd:
    4343g_szForeignHD:          db  "Foreign Hard Disk",NULL
    4444
    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
     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
    4949%endif
    5050
    5151; POST drive detection strings
    5252g_szRomAt:      db  "%s @ %x",LF,CR,NULL
    53                
     53
    5454; Boot loader strings
    5555g_szTryToBoot:          db  "Booting from %s %x",ANGLE_QUOTE_RIGHT,"%x",LF,CR,NULL
     
    6363g_szRomBoot:    db  "ROM Boot",NULL
    6464g_szHotkey:     db  "%A%c%c%A%s%A ",NULL
    65                
     65
    6666; Boot Menu information strings
    6767g_szCapacity:           db  "Capacity : %s",NULL
    68 g_szCapacityNum:        db  "%5-u.%u %ciB",NULL     
     68g_szCapacityNum:        db  "%5-u.%u %ciB",NULL
    6969g_szSizeDual:           db  "%s /%s",LF,CR
    7070    db  "Addr.",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",SINGLE_VERTICAL,  "IRQ",SINGLE_VERTICAL,"Reset",LF,CR
     
    7272
    7373; Boot Menu Floppy Disk strings
    74 ; 
     74;
    7575; 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, 
     76; To support optimizations in that code, these strings must start on the same 256 byte page,
    7777; which is checked at assembly time below.
    78 ;               
    79 g_szFddStart:   
     78;
     79g_szFddStart:
    8080g_szFddUnknown: db  "Unknown",NULL
    8181g_szFddSizeOr:  db  "5",ONE_QUARTER,QUOTATION_MARK," or 3",ONE_HALF,QUOTATION_MARK," DD",NULL
    8282g_szFddSize:    db  "%s",QUOTATION_MARK,", %u kiB",NULL ; 3½", 1440 kiB
    8383g_szFddThreeHalf:       db  "3",ONE_HALF,NULL
    84 g_szFddEnd:     
     84g_szFddEnd:
    8585g_szFddFiveQuarter:     db  "5",ONE_QUARTER,NULL
    8686
    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 
    93 g_szAddressingModes:                   
     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
     93g_szAddressingModes:
    9494g_szLCHS:       db  "L-CHS",NULL
    9595g_szPCHS:       db  "P-CHS",NULL
     
    100100; Ensure that addressing modes are correctly spaced in memory
    101101;
    102 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS       
    103 %if g_szLCHS <> g_szAddressingModes
    104 %error "g_szAddressingModes Displacement Incorrect 1"
    105 %endif
    106 %if g_szPCHS <> g_szLCHS + g_szAddressingModes_Displacement
    107 %error "g_szAddressingModes Displacement Incorrect 2"
    108 %endif
    109 %if g_szLBA28 <> g_szPCHS + g_szAddressingModes_Displacement       
    110 %error "g_szAddressingModes Displacement Incorrect 3"
    111 %endif
    112 %if g_szLBA48 <> g_szLBA28 + g_szAddressingModes_Displacement       
    113 %error "g_szAddressingModes Displacement Incorrect 4"
    114 %endif
    115 %endif     
    116        
    117 g_szBusTypeValues:     
     102%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
     103    %if g_szLCHS <> g_szAddressingModes
     104        %error "g_szAddressingModes Displacement Incorrect 1"
     105    %endif
     106    %if g_szPCHS <> g_szLCHS + g_szAddressingModes_Displacement
     107        %error "g_szAddressingModes Displacement Incorrect 2"
     108    %endif
     109    %if g_szLBA28 <> g_szPCHS + g_szAddressingModes_Displacement
     110        %error "g_szAddressingModes Displacement Incorrect 3"
     111    %endif
     112    %if g_szLBA48 <> g_szLBA28 + g_szAddressingModes_Displacement
     113        %error "g_szAddressingModes Displacement Incorrect 4"
     114    %endif
     115%endif
     116
     117g_szBusTypeValues:
    118118g_szBusTypeValues_8Dual:        db      "D8 ",NULL
    119119g_szBusTypeValues_8Reversed:    db      "X8 ",NULL
     
    126126; Ensure that bus type strings are correctly spaced in memory
    127127;
    128 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS               
    129 %if g_szBusTypeValues_8Dual <> g_szBusTypeValues
    130 %error "g_szBusTypeValues Displacement Incorrect 1"
    131 %endif
    132 %if g_szBusTypeValues_8Reversed <> g_szBusTypeValues + g_szBusTypeValues_Displacement
    133 %error "g_szBusTypeValues Displacement Incorrect 2"     
    134 %endif
    135 %if g_szBusTypeValues_8Single <> g_szBusTypeValues_8Reversed + g_szBusTypeValues_Displacement
    136 %error "g_szBusTypeValues Displacement Incorrect 3"             
    137 %endif
    138 %if g_szBusTypeValues_16 <> g_szBusTypeValues_8Single + g_szBusTypeValues_Displacement     
    139 %error "g_szBusTypeValues Displacement Incorrect 4"             
    140 %endif
    141 %if g_szBusTypeValues_32 <> g_szBusTypeValues_16 + g_szBusTypeValues_Displacement
    142 %error "g_szBusTypeValues Displacement Incorrect 5"             
    143 %endif
    144 %if g_szBusTypeValues_Serial <> g_szBusTypeValues_32 + g_szBusTypeValues_Displacement
    145 %error "g_szBusTypeValues Displacement Incorrect 6"             
    146 %endif
    147 %endif
    148        
     128%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
     129    %if g_szBusTypeValues_8Dual <> g_szBusTypeValues
     130        %error "g_szBusTypeValues Displacement Incorrect 1"
     131    %endif
     132    %if g_szBusTypeValues_8Reversed <> g_szBusTypeValues + g_szBusTypeValues_Displacement
     133        %error "g_szBusTypeValues Displacement Incorrect 2"
     134    %endif
     135    %if g_szBusTypeValues_8Single <> g_szBusTypeValues_8Reversed + g_szBusTypeValues_Displacement
     136        %error "g_szBusTypeValues Displacement Incorrect 3"
     137    %endif
     138    %if g_szBusTypeValues_16 <> g_szBusTypeValues_8Single + g_szBusTypeValues_Displacement
     139        %error "g_szBusTypeValues Displacement Incorrect 4"
     140    %endif
     141    %if g_szBusTypeValues_32 <> g_szBusTypeValues_16 + g_szBusTypeValues_Displacement
     142        %error "g_szBusTypeValues Displacement Incorrect 5"
     143    %endif
     144    %if g_szBusTypeValues_Serial <> g_szBusTypeValues_32 + g_szBusTypeValues_Displacement
     145        %error "g_szBusTypeValues Displacement Incorrect 6"
     146    %endif
     147%endif
     148
    149149g_szSelectionTimeout:   db      DOUBLE_BOTTOM_LEFT_CORNER,DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL,"%ASelection in %2-u s",NULL
    150150
     
    153153
    154154;------------------------------------------------------------------------------------------
    155 ; 
     155;
    156156; Tables for StringsCompress.pl
    157157;
     
    167167;$translate{ord('.')} = 9;
    168168;$translate{ord('/')} = 10;
    169 ;$translate{ord('1')} = 11;   
     169;$translate{ord('1')} = 11;
    170170;$translate{ord('2')} = 12;
    171171;$translate{ord('3')} = 13;
     
    197197;
    198198; Starting point for the "normal" range, typically around 0x40 to cover upper and lower case
    199 ; letters.  If lower case 'z' is not used, 0x3a can be a good choice as it adds ':' to the 
     199; letters.  If lower case 'z' is not used, 0x3a can be a good choice as it adds ':' to the
    200200; front end.
    201201;
     
    207207
    208208
    209 
    210 
Note: See TracChangeset for help on using the changeset viewer.