source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Src/Strings.asm@ 245

Last change on this file since 245 was 242, checked in by krille_n_@…, 13 years ago

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 size: 7.8 KB
Line 
1; Project name : XTIDE Universal BIOS
2; Description : Strings and equates for BIOS messages.
3
4%ifdef MODULE_STRINGS_COMPRESSED_PRECOMPRESS
5 %include "Display.inc"
6%endif
7
8; Section containing code
9SECTION .text
10
11; 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,
13; which is checked at assembly time below.
14;
15g_szDetectStart:
16g_szDetectMaster: db "Master",NULL
17g_szDetectSlave: db "Slave ",NULL
18g_szDetectOuter: db "IDE %s at %s: ",NULL
19g_szDetectPort: db "%x",NULL ; IDE Master at 1F0h:
20g_szDetectCOM: db "COM%c%s",NULL
21g_szDetectCOMAuto: db " Auto",NULL
22g_szDetectCOMSmall: db "/%u%u00",NULL ; IDE Master at COM1/9600:
23g_szDetectEnd:
24g_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
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
53
54; Boot loader strings
55g_szTryToBoot: db "Booting from %s %x",ANGLE_QUOTE_RIGHT,"%x",LF,CR,NULL
56g_szBootSectorNotFound: db "Boot sector "
57g_szNotFound: db "not found",LF,CR,NULL
58g_szReadError: db "Error %x!",LF,CR,NULL
59
60; Boot menu bottom of screen strings
61g_szFDD: db "FDD ",NULL
62g_szHDD: db "HDD ",NULL
63g_szRomBoot: db "ROM Boot",NULL
64g_szHotkey: db "%A%c%c%A%s%A ",NULL
65
66; Boot Menu information strings
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
93g_szAddressingModes:
94g_szLCHS: db "L-CHS",NULL
95g_szPCHS: db "P-CHS",NULL
96g_szLBA28: db "LBA28",NULL
97g_szLBA48: db "LBA48",NULL
98g_szAddressingModes_Displacement equ (g_szPCHS - g_szAddressingModes)
99;
100; Ensure that addressing modes are correctly spaced in memory
101;
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:
118g_szBusTypeValues_8Dual: db "D8 ",NULL
119g_szBusTypeValues_8Reversed: db "X8 ",NULL
120g_szBusTypeValues_8Single: db "S8 ",NULL
121g_szBusTypeValues_16: db " 16",NULL
122g_szBusTypeValues_32: db " 32",NULL
123g_szBusTypeValues_Serial: db "SER",NULL
124g_szBusTypeValues_Displacement equ (g_szBusTypeValues_8Reversed - g_szBusTypeValues)
125;
126; Ensure that bus type strings are correctly spaced in memory
127;
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
149g_szSelectionTimeout: db DOUBLE_BOTTOM_LEFT_CORNER,DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL,"%ASelection in %2-u s",NULL
150
151g_szDashForZero: db "- ",NULL
152
153
154;------------------------------------------------------------------------------------------
155;
156; Tables for StringsCompress.pl
157;
158;$translate{ord(' ')} = 0;
159;$translate{172} = 1; # ONE_QUARTER
160;$translate{171} = 2; # ONE_HALF
161;$translate{179} = 3; # SINGLE_VERTICAL
162;$translate{175} = 4; # ANGLE_QUOTE_RIGHT
163;$translate{ord('!')} = 5;
164;$translate{ord('"')} = 6;
165;$translate{ord(',')} = 7;
166;$translate{ord('-')} = 8;
167;$translate{ord('.')} = 9;
168;$translate{ord('/')} = 10;
169;$translate{ord('1')} = 11;
170;$translate{ord('2')} = 12;
171;$translate{ord('3')} = 13;
172;$translate{ord('4')} = 14;
173;$translate{ord('5')} = 15;
174;$translate{ord('6')} = 16;
175;$translate{ord('8')} = 17;
176;$translate{200} = 18; # DOUBLE_BOTTOM_LEFT_CORNER
177;$translate{181} = 19; # DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL
178;$translate{ord('0')} = 20;
179;
180; Formats begin immediately after the last Translated character (they are in the same table)
181;
182;$format_begin = 21;
183;
184;$format{"c"} = 21; # n/a
185;$format{"2-I"} = 22; # must be even
186;$format{"u"} = 23; # must be odd
187;$format{"5-u"} = 24; # must be even
188;$format{"x"} = 25; # must be odd
189;$format{"5-x"} = 26; # must be even
190;$format{"nl"} = 27; # n/a
191;$format{"2-u"} = 28; # must be even
192;$format{"A"} = 29; # n/a
193;$format{"s"} = 30; # n/a, normal string from DS
194;$format{"z"} = 31; # n/a, boot string from BDA
195;
196; NOTE: The last $format cannot exceed 31 (stored in a 5-bit quantity).
197;
198; 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
200; front end.
201;
202;$normal_base = 0x3a;
203;
204; End of StringsCompress.pl information
205;
206;------------------------------------------------------------------------------------------
207
208
Note: See TracBrowser for help on using the repository browser.