Changeset 631 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages
- Timestamp:
- Feb 1, 2025, 12:45:33 PM (10 hours ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/IdeControllerMenu.asm
r625 r631 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-202 3by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2025 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 133 133 at MENUITEM.bType, db TYPE_MENUITEM_HEX 134 134 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw NULL 135 at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgIde CmdPort135 at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgIdeSerialPort 136 136 at MENUITEM.itemValue + ITEM_VALUE.wMinValue, dw 8h 137 137 at MENUITEM.itemValue + ITEM_VALUE.wMaxValue, dw 3F8h … … 578 578 push ax 579 579 xlat 580 mov [es:di+IDEVARS.bIRQ -IDEVARS.wBasePort], al580 mov [es:di+IDEVARS.bIRQ], al 581 581 pop ax 582 582 … … 639 639 ; XT-CF does not support IRQ so it must be disabled (IRQ setting is not visible for XT-CF) 640 640 ; XTIDE does not use IRQs by default 641 mov BYTE [es:di+IDEVARS.bIRQ -IDEVARS.wBasePort], 0641 mov BYTE [es:di+IDEVARS.bIRQ], 0 642 642 643 643 .WriteNonSerial: … … 658 658 659 659 .ChangingToSerial: 660 ; 661 ; For serial drives, we pack the port number and baud rate into a single byte, and thus 662 ; we need to take care to properly read/write just the bits we need. In addition, since 663 ; we use the Port/PortCtrl bytes in a special way for serial drives, we need to properly 664 ; default the values stored in both these words when switching in and out of the Serial 665 ; device choice. 666 ; 667 mov al, SERIAL_DEFAULT_COM 668 mov BYTE [es:di+IDEVARS.bSerialBaud-IDEVARS.wBasePort], SERIAL_DEFAULT_BAUD 669 mov [es:di+IDEVARS.bIRQ-IDEVARS.wBasePort], ah ; Clear .bIRQ to keep the boot menu from printing it 670 660 mov al, ah ; Clear AL to point to the default COM port in the PackedCOMPortAddresses table 661 mov BYTE [es:di+IDEVARS.bSerialBaud], SERIAL_DEFAULT_BAUD 662 mov [es:di+IDEVARS.bIRQ], ah ; Clear .bIRQ to keep the boot menu from printing it 671 663 sub di, IDEVARS.wBasePort - IDEVARS.bSerialCOMPortChar 664 mov BYTE [es:di], SERIAL_DEFAULT_COM 672 665 call IdeControllerMenu_SerialWriteCOM 673 stosb674 666 675 667 .Done: … … 685 677 ; 686 678 ; Parameters: 687 ; A L: COM port679 ; AX: COM port menu choice index 688 680 ; ES:DI: Ptr to IDEVARS.bSerialCOMPortChar 689 681 ; DS:SI: MENUITEM pointer 690 682 ; Returns: 691 ; Nothing683 ; AX: COM port menu choice index 692 684 ; Corrupts registers: 693 685 ; BX … … 695 687 ALIGN JUMP_ALIGN 696 688 IdeControllerMenu_SerialWriteCOM: 697 push ax 698 push si 699 700 mov bx, PackedCOMPortAddresses - 1 701 mov si, g_rgbChoiceToValueLookupForCOM - 2 702 703 .Loop: 704 inc bx 705 inc si 706 inc si 707 708 mov ah, [bx] 709 cmp ah, SERIAL_DEFAULT_CUSTOM_PORT >> 2 710 je SHORT .NotFound 711 712 cmp al, [si] 713 jne SHORT .Loop 714 715 .NotFound: 716 mov [es:di+IDEVARS.bSerialPort-IDEVARS.bSerialCOMPortChar], ah 717 718 pop si 719 pop ax 689 xchg bx, ax 690 mov al, [bx+PackedCOMPortAddresses] 691 mov [es:di+IDEVARS.bSerialPort-IDEVARS.bSerialCOMPortChar], al 692 xchg bx, ax 720 693 ret 721 694
Note:
See TracChangeset
for help on using the changeset viewer.