Changeset 380 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages
- Timestamp:
- Apr 8, 2012, 6:17:37 PM (13 years ago)
- google:author:
- krille_n_@hotmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/ConfigurationMenu.asm
r376 r380 3 3 4 4 ; 5 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 6 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 7 7 ; … … 10 10 ; the Free Software Foundation; either version 2 of the License, or 11 11 ; (at your option) any later version. 12 ; 12 ; 13 13 ; This program is distributed in the hope that it will be useful, 14 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 ; GNU General Public License for more details. 16 ; GNU General Public License for more details. 17 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 18 ; 19 19 20 20 ; Section containing initialized data … … 26 26 at MENUPAGE.fnEnter, dw ConfigurationMenu_EnterMenuOrModifyItemVisibility 27 27 at MENUPAGE.fnBack, dw MainMenu_EnterMenuOrModifyItemVisibility 28 at MENUPAGE.wMenuitems, dw 928 at MENUPAGE.wMenuitems, dw 10 29 29 iend 30 30 … … 135 135 iend 136 136 137 g_MenuitemConfigurationIdleTimeout: 138 istruc MENUITEM 139 at MENUITEM.fnActivate, dw Menuitem_ActivateMultichoiceSelectionForMenuitemInDSSI 140 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteLookupValueStringToBufferInESDIfromRawItemInDSSI 141 at MENUITEM.szName, dw g_szItemCfgIdleTimeout 142 at MENUITEM.szQuickInfo, dw g_szNfoCfgIdleTimeout 143 at MENUITEM.szHelp, dw g_szHelpCfgIdleTimeout 144 at MENUITEM.bFlags, db FLG_MENUITEM_VISIBLE | FLG_MENUITEM_BYTEVALUE | FLG_MENUITEM_CHOICESTRINGS 145 at MENUITEM.bType, db TYPE_MENUITEM_MULTICHOICE 146 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw ROMVARS.bIdleTimeout 147 at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgCfgIdleTimeout 148 at MENUITEM.itemValue + ITEM_VALUE.szMultichoice, dw g_szMultichoiceIdleTimeout 149 at MENUITEM.itemValue + ITEM_VALUE.rgwChoiceToValueLookup, dw g_rgwChoiceToValueLookupForIdleTimeout 150 at MENUITEM.itemValue + ITEM_VALUE.rgszChoiceToStringLookup, dw g_rgszChoiceToStringLookupForIdleTimeout 151 iend 152 153 g_rgwChoiceToValueLookupForIdleTimeout: 154 %assign i -12 155 %rep 21 156 %assign i i+12 157 dw i ; i / 12 = 0 (disabled) or 1...20 minutes 158 %endrep 159 %rep 4 160 %assign i i+1 161 dw i ; 241...244 = (i - 240) * 30 minutes 162 %endrep 163 g_rgszChoiceToStringLookupForIdleTimeout: 164 %assign i 0 165 %rep 25 166 dw g_szIdleTimeoutChoice%[i] 167 %assign i i+1 168 %endrep 169 ; dw NULL ; Is this needed? *FIXME* 137 170 138 171 ; Section containing code … … 297 330 ; ConfigurationMenu_CheckAndMoveSerialDrivesToBottom 298 331 ; 299 ; Checks to ensure that serial adapters are at the end of the 300 ; IDEVARS structures list, as serial floppies (if present) need to be 332 ; Checks to ensure that serial adapters are at the end of the 333 ; IDEVARS structures list, as serial floppies (if present) need to be 301 334 ; the last drives detected by the BIOS. If there are other controllers 302 335 ; after a serial controller, the other controllers are moved up on the list … … 309 342 ; Corrupts registers: 310 343 ; All 311 ;---------------------------------------------------------------------- 312 ConfigurationMenu_CheckAndMoveSerialDrivesToBottom: 344 ;---------------------------------------------------------------------- 345 ConfigurationMenu_CheckAndMoveSerialDrivesToBottom: 313 346 push es 314 347 push ds … … 319 352 push es 320 353 pop ds 321 mov ch, 0 ; clearing high order of CX and notification flag 322 mov dx, cx ; (probably unncessary, CX should be less than 127, but just to be sure) 323 jcxz .done ; probably unnecessary, but make sure there is at least one controller 324 325 add di, ROMVARS.ideVars0 ; add in offset of first idevars 326 mov bx, di 354 xor ch, ch ; clearing high order of CX and notification flag 355 mov dx, cx ; (probably unnecessary, CX should be less than 127, but just to be sure) 356 jcxz .done ; probably unnecessary, but make sure there is at least one controller 357 358 lea bx, [di+ROMVARS.ideVars0] ; add in offset of first idevars 327 359 328 360 .outerLoop: … … 331 363 xor ax, ax ; first non-serial found 332 364 mov cl, dl ; idevars count 333 mov ch, 0365 xor ch, ch 334 366 335 367 .loop: … … 337 369 jnz .notSerial 338 370 339 test si, si ; record the first serial controller tthat we find340 jnz .next 371 test si, si ; record the first serial controller that we find 372 jnz .next 341 373 mov si, di 342 374 jmp .next … … 345 377 mov ax, di ; record the *last* non-serial controller that we find 346 378 347 .next: 379 .next: 348 380 add di, IDEVARS_size 349 381 loop .loop 350 382 351 test si, si ; no serial drives, nothing to do383 test si, si ; no serial drives, nothing to do 352 384 jz .done 353 cmp si, ax ; serial port is already later on the list than any other controllers354 ja .done ; (also takes care of the case where ther are no other controllers)385 cmp si, ax ; serial port is already later on the list than any other controllers 386 ja .done ; (also takes care of the case where there are no other controllers) 355 387 356 388 ; … … 371 403 rep movsb 372 404 373 mov di, si ; move up all the idevars below the serial, by one slot 374 sub di, IDEVARS_size 405 lea di, [si-IDEVARS_size] ; move up all the idevars below the serial, by one slot 375 406 376 407 mov cx, ax ; restore end pointer of list, subtract off end of serial idevars … … 387 418 mov cx, IDEVARS_size 388 419 ; di is already at last IDEVARS position 389 420 390 421 rep movsb 391 422 392 add sp, IDEVARS_size 423 add sp, IDEVARS_size 393 424 394 425 push es … … 396 427 397 428 mov dh, 1 ; set flag that we have done a relocation 398 429 399 430 jmp .outerLoop 400 431 … … 407 438 test dh, dh 408 439 jz .noWorkDone 409 440 410 441 mov dx, g_szSerialMoved 411 442 call Dialogs_DisplayNotificationFromCSDX 412 443 413 .noWorkDone: 444 .noWorkDone: 414 445 ret
Note:
See TracChangeset
for help on using the changeset viewer.