Changeset 233 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/MenuitemPrint.asm
- Timestamp:
- Feb 4, 2012, 6:21:22 PM (13 years ago)
- google:author:
- gregli@hotmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/MenuitemPrint.asm
r107 r233 156 156 ALIGN JUMP_ALIGN 157 157 MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI: 158 MenuitemPrint_WriteLookupValueStringToBufferInESDIfromRawItemInDSSI: 158 159 call Menuitem_GetValueToAXfromMenuitemInDSSI 159 160 ; Fall to PrintLookupValueFromAXtoBufferInESDI … … 173 174 PrintLookupValueFromAXtoBufferInESDI: 174 175 push si 176 test byte [si+MENUITEM.bFlags], FLG_MENUITEM_CHOICESTRINGS 177 jnz .lookupChoice 178 175 179 add ax, [si+MENUITEM.itemValue+ITEM_VALUE.rgszValueToStringLookup] 176 180 xchg bx, ax 181 .found: 177 182 mov si, [bx] 183 .errorReturn: 178 184 call String_CopyDSSItoESDIandGetLengthToCX 179 185 pop si 180 186 ret 181 187 188 ; 189 ; With FLG_MENUITEM_CHOICESTRINGS, the array at .rgszChoiceToStringLookup is based on the 190 ; Choice number (offset within .rgwChoiceToValueLookup) instead of the value stored. 191 ; Here, we scan the .rgwChoiceToValueLookup array until we find the value there, and then 192 ; use the same offset in .rgszChoiceToStringLookup. If we don't find the value, we 193 ; return an "Error!" string instead. 194 ; 195 ; Note that the pointer array at .rgszChoiceToStringLookup must be NULL terminated. Since the 196 ; value could be zero, we don't use the .rgwChoiceToValueLookup array to find the end. 197 ; 198 .lookupChoice: 199 mov bx,[si+MENUITEM.itemValue+ITEM_VALUE.rgszChoiceToStringLookup] 200 mov si,[si+MENUITEM.itemValue+ITEM_VALUE.rgwChoiceToValueLookup] 201 202 .wordLoop: 203 cmp ax,[si] 204 jz .found 205 inc si 206 inc si 207 inc bx 208 inc bx 209 cmp word [bx],0 210 jnz .wordLoop 211 212 mov si,g_szValueUnknownError 213 jmp .errorReturn 182 214 183 215 ;--------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.