; []===========================================================[] ; ; NOTICE: THIS PROGRAM BELONGS TO AWARD SOFTWARE INTERNATIONAL(R) ; INC. IT IS CONSIDERED A TRADE SECRET AND IS NOT TO BE ; DIVULGED OR USED BY PARTIES WHO HAVE NOT RECEIVED ; WRITTEN AUTHORIZATION FROM THE OWNER. ; ; []===========================================================[] ; ifdef ONBOARD_CMD_IDSEL ;---------------------------------------------------------------------------- ;Rev Date Name Description ;---------------------------------------------------------------------------- ;R06 03/07/97 RAX Add 'IDE_PRIMARY_ONLY' define and 'NEW_IDE_MODE_3' ; support and reduce code ;R04A 01/23/96 RIC Remove some needless code. ;R01A 10/14/96 AVN Fixed if Compile by MASM 6.0 after versio, always auto ; public proc, and Get_PCI,Set_PCI will Conflict with ; chiprun.asm ;R05 08/28/96 RIC Fix the bug that Special_Show cause frash ;R04 05/29/96 RIC Add Control_CMD_PIO_OnOff define for On/Off PIO mode. ;R03 11/23/95 RCH Fixed error coding , this cause CMD can not be ; disabled. ;R02 11/17/95 RCH Now, only three choices for CMD/646 ;R01 11/02/95 RCH Use "Get_CfgSpace_Byte" instead of local "Get_Pci" ;R00 10/05/95 KGN First Codeing ;============================================================================ ; Use this kernel must defin NEW_SUPERIDE_KERNEL ; IDECMOS : It need last 14 bit continue location ; ONBOARD_CMD_IDSEL : It is this Chip's ID address ; It is better to disable OnChip IDE controller's . Because use this chip ;custumer don't use OnChip IDE controller. ;============================================================================ ;*************************************************************************** ;******* SUPERIO.ASM SUPERIO.ASM SUPERIO.ASM SUPERIO.ASM SUPERIO.ASM ******* ;******* SUPERIO.ASM SUPERIO.ASM SUPERIO.ASM SUPERIO.ASM SUPERIO.ASM ******* ;******* SUPERIO.ASM SUPERIO.ASM SUPERIO.ASM SUPERIO.ASM SUPERIO.ASM ******* ;******* SUPERIO.ASM SUPERIO.ASM SUPERIO.ASM SUPERIO.ASM SUPERIO.ASM ******* ;*************************************************************************** ifdef COMPILE_FOR_SUPERIDE_ASM IF COMPILE_FOR_SUPERIDE_ASM EQ 1 extrn CmdIDE_Item:Near ifdef Control_CMD_PIO_OnOff ;R04 extrn CmdPIO_Item:Near endif ;Control_CMD_PIO_OnOff ;R04 extrn CMD_ch0_Mode_Item:near extrn CMD_ch2_Mode_Item:near ifndef IDE_PRIMARY_ONLY ;R06 extrn CMD_ch1_Mode_Item:near extrn CMD_ch3_Mode_Item:near endif ;IDE_PRIMARY_ONLY ;R06 extrn ide_mode_diff:abs extrn HDDC_ITEM:abs extrn HDDD_ITEM:abs extrn HDDE_ITEM:abs extrn HDDF_ITEM:abs extrn Get_HDD_CMOS_Info:abs extrn Ct_Get_PCI_Clock:abs extrn F000_Get_CfgSpace_Byte:near ;R06 extrn F000_Set_CfgSpace_Byte:near ;R06 ENDIF ;COMPILE_FOR_SUPERIDE_ASM EQ 1 IF COMPILE_FOR_SUPERIDE_ASM EQ 2 public Early_IdeChip_Init Early_IdeChip_Init proc near mov si,offset CmdIde_Item call E_GetItem_Value ;al : 0 Disabled ; 1 Primary ; 2 both ; 3 reserve xor ah,ah ;disable chip or al,al ;if user choose disable ;R03 jnz short IdeChip_Disable jz short IdeChip_Disable ;R03 xor ah,ah ;assume 2nd disabled cmp al,2 ;both enabled ? jne short Only_Primary mov ah,08H ;enable 2nd channel ;control second channel mov cx,(ONBOARD_CMD_IDSEL SHL 11) + 51H ;R01A call Get_Pci ;R06 F000_call Get_CfgSpace_Byte ;R01A call F000_Get_CfgSpace_Byte ;R06 and al,NOT 08H or al,ah ;R01A call Set_Pci ;R06 F000_call Set_CfgSpace_Byte ;R01A call F000_Set_CfgSpace_Byte ;R06 Only_Primary: mov ah,03H ;enable chip IdeChip_Disable: ;set command register mov cx,(ONBOARD_CMD_IDSEL SHL 11) + 4 ;R01A call Get_Pci ;R06 F000_call Get_CfgSpace_Byte ;R01A call F000_Get_CfgSpace_Byte ;R06 and al,NOT 03H or al,ah ;R01A call Set_Pci ;R06 F000_call Set_CfgSpace_Byte ;R01A call F000_Set_CfgSpace_Byte ;R06 ret Early_IdeChip_Init endp public Prg_Super_IDE_Chip Prg_Super_IDE_Chip: Prg_Super_io_CMDIDE Proc Near ;point to right table xor ebx,ebx ;clear EBX mov bx,offset CMD_640B_table;point to 0640B table call Chk_Chip ;check chip version cmp al,46h ;if is 0646 ? jne short @f ;no , it is 0640B mov bx,offset CMD_646_table ;point to 0646 table @@: F000_call Ct_Get_PCI_Clock; input CL 0 : 20 MHz ; 1 : 25 MHz ; 2 : 30 MHz ; 3 : 33 MHz ; 4 : 40 MHz mov ax, One_table_length mul cl ;point to right table add bx,ax shl ebx,16 ;save it to EBX high word ;set device mode start here xor di,di ;di = drive number mov si,offset CMD_ch0_Mode_Item ;si point to first item CMD_4DRIVE_LOOP: push si ;save si value mov si,offset HDD_CMOS_Table ;si point to HDD CMOS table add si,di ;point to right item mov al,byte ptr cs:[si] ;put value to AL cmp al,0 ;setup choose disable ? jne short @f ;no jmp device_Disable ;else go check next item @@: mov si,offset Hdd_Item_table ;si point to HDD ITEM table shl di,1 ;a item is a word add si,di ;point to right item shr di,1 ;restore di value mov bx,word ptr cs:[si] ;put value to BX push di ;save DI value f000_call Get_HDD_CMOS_Info ;check if absent cmp word ptr [bp+di],0 ;CYLINDER = 0 ? pop di ;restore DI jne short @f ;no jmp device_Disable ;else go check next item @@: pop si ;restore SI , SI is item offset push si ;save SI push di ;save DI call E_GetItem_Value ;al : 0 Auto ; 1 mode 0 ; 2 mode 1 ; 3 mode 2 ; 4 mode 3 ; 5 mode 4 ; 6 mode 5 reserved ; 7 mode 6 reserved pop di ;restore DI or al,al ;if user choose AUTO jz short CMD_mode_in_BP ;yes dec al ;value sub 1 = mode 0,1,2,3,4 mov HDD_0_MODE[bp+di],al ;put right value to HDD_0_MODE CMD_mode_in_BP: mov bx,offset Arttim_Index_Table mov ax,di xlat cs:[bx] ;get right value xor cx,cx mov cx,(ONBOARD_CMD_IDSEL SHL 11) or cl,al mov al,HDD_0_MODE[bp+di] ;AL is which mode ;R04-starts ifdef Control_CMD_PIO_OnOff pushad mov si, offset CmdPIO_Item call E_GetItem_Value ;al : 0 Disabled or al,al ;if set Disabled popad jne short @f ;No,jmp mov al,0 ;force set mode 0 @@: endif ;Control_CMD_PIO_OnOff ;R04-ends rol ebx,16 xlat cs:[bx] ror ebx,16 Set_Arttim: ;R01A call Set_Pci ;set ARTTIM register ;R06 F000_call Set_CfgSpace_Byte ;R01A call F000_Set_CfgSpace_Byte ;R06 inc cx ;point to Drwtim register index cmp di,3 jne short @f ;if it is not drive 3 call Chk_Chip cmp al,46h jne short @f ;if it is not 646 add cx,3 @@: rol ebx,16 mov al,HDD_0_MODE[bp+di] ;AL is which mode ;R04-starts ifdef Control_CMD_PIO_OnOff pushad mov si, offset CmdPIO_Item call E_GetItem_Value ;al : 0 Disabled or al,al ;if set Disabled popad jne short @f ;No,jmp mov al,0 ;force set mode 0 @@: endif ;Control_CMD_PIO_OnOff ;R04-ends add al,table_length xlat cs:[bx] ;get right value rol ebx,16 Set_Drwtim: ;R01A call Set_Pci ;set DRWTIM register ;R06 F000_call Set_CfgSpace_Byte ;R01A call F000_Set_CfgSpace_Byte ;R06 device_disable: pop si ;get Mode Item add si,Ide_mode_diff ;point to next item inc di cmp di,3 ;if is over channel 1 slave ja short @f jmp CMD_4DRIVE_LOOP ;then do return @@: ;disable drive 1 - 2 Read Ahead Bit mov cx,(ONBOARD_CMD_IDSEL SHL 11) + 51h ;R01A call Get_Pci ;R06 F000_call Get_CfgSpace_Byte ;R01A call F000_Get_CfgSpace_Byte ;R06 or al,11000000b ;R01A call Set_Pci ;R06 F000_call Set_CfgSpace_Byte ;R01A call F000_Set_CfgSpace_Byte ;R06 mov cx,(ONBOARD_CMD_IDSEL SHL 11) + 57h ;R01A call Get_Pci ;R06 F000_call Get_CfgSpace_Byte ;R01A call F000_Get_CfgSpace_Byte ;R06 or al,00001100b ;R01A call Set_Pci ;R06 F000_call Set_CfgSpace_Byte ;R01A call F000_Get_CfgSpace_Byte ;R06 ;set Read Ahead Bit Here xor di,di Set_Read_Ahead: mov si,offset HDD_CMOS_Table add si,di mov al,byte ptr cs:[si] cmp al,0 ;setup choose disable je short @f ;yes mov si,offset Hdd_Item_table shl di,1 add si,di shr di,1 mov bx,word ptr cs:[si] push di ;save DI value f000_call Get_HDD_CMOS_Info ;check if absent cmp word ptr [bp+di],0 ;CYLINDER = 0 ? pop di je short @f ;yes mov si,offset read_ahead_table add si,di xor ax,ax xor cx,cx mov al,byte ptr cs:[si] mov cx,(ONBOARD_CMD_IDSEL SHL 11) or cx,ax ;R01A call Get_Pci ;R06 F000_call Get_CfgSpace_Byte ;R01A call F000_Get_CfgSpace_Byte ;R06 push ax mov si,offset and_data_Table add si,di mov bl,byte ptr cs:[si] pop ax and al,bl ;enable Read Ahead ;R01A call Set_Pci ;R06 F000_call Set_CfgSpace_Byte ;R01A call F000_Set_CfgSpace_Byte ;R06 @@: inc di cmp di,3 jbe short Set_Read_Ahead Choose_Disable: ret Prg_Super_io_CMDIDE endp ;R01A align 4 ;R01ACONFIG_ADDR EQU 0cf8h ;R01AGet_Pci Proc Near ;R01 push dx ;R01 mov eax,80000000h ;R01 mov ax,cx ;R01 and al,NOT 03h ;32 bit access for PCI ;R01 mov dx,CONFIG_ADDR ;index is 0cf8h ;R01 out dx,eax ;R01 add dl,4 ;start from 0cfch ;R01 mov al,cl ;R01 and al,3 ;R01 add dl,al ;byte index to read ;R01 in al,dx ;R01 pop dx ;R01A F000_call Get_CfgSpace_Byte ;R01 ;R01A ret ;R01AGet_Pci endp ;R01A align 4 ;R01ASet_Pci Proc Near ;R01 push ax ;save value ;R01 mov eax,80000000h ;R01 mov ax,cx ;PCI address ;R01 and al,NOT 03h ;32 bit access for PCI ;R01 mov dx,CONFIG_ADDR ;index is 0cf8h ;R01 out dx,eax ;set PCI address ;R01 add dl,4 ;read register cfch ;R01 mov al,cl ;R01 and al,3 ;R01 add dl,al ;point to right index ;R01 pop ax ;restore value ;R01 out dx,al ;R01A F000_call Set_CfgSpace_Byte ;R01 ;R01A ret ;R01ASet_Pci Endp align 4 Chk_Chip Proc Near push cx mov cx,(ONBOARD_CMD_IDSEL SHL 11) + 2 ;check device ID ;R01A call Get_Pci ;R06 F000_call Get_CfgSpace_Byte ;R01A call F000_Get_CfgSpace_Byte ;R06 pop cx ret Chk_Chip endp Arttim_Index_Table: db 53h,55h,57h,57h Hdd_Item_table: dw offset HDDC_ITEM dw offset HDDD_ITEM dw offset HDDE_ITEM dw offset HDDF_ITEM and_data_Table: db 10111111b db 01111111b db 11111011b db 11110111b HDD_CMOS_Table: db EXT_FIXED_0 db EXT_FIXED_1 db CMOS_HDDE db CMOS_HDDF read_ahead_table: db 51h,51h,57h,57h CMD_640B_table: db 00h,00h,00h,00h,00h ;20MHz mode 0-4(,5,6)ARTTIM db 00h,00h,00h,00h,00h ;20MHz mode 0-4(,5,6)DRWTIM One_table_length = $ - ( offset CMD_640B_table ) table_length = One_table_length / 2 db 40h,40h,40h,40h,40h ;25MHz mode 0-4(,5,6)ARTTIM db 59h,45h,32h,22h,31h ;25MHz mode 0-4(,5,6)DRWTIM db 80h,40h,40h,40h,40h ;30MHz mode 0-4(,5,6)ARTTIM db 5dh,47h,43h,32h,31h ;30MHz mode 0-4(,5,6)DRWTIM db 80h,40h,40h,40h,40h ;33MHz mode 0-4(,5,6)ARTTIM db 6Dh,57h,43h,32h,31h ;33MHz mode 0-4(,5,6)DRWTIM db 00h,00h,00h,00h,00h ;40MHz mode 0-4(,5,6)ARTTIM db 00h,00h,00h,00h,00h ;40MHz mode 0-4(,5,6)DRWTIM CMD_646_table: db 00h,00h,00h,00h,00h ;20MHz mode 0-4(,5,6)ARTTIM db 00h,00h,00h,00h,00h ;20MHz mode 0-4(,5,6)DRWTIM db 40h,40h,40h,40h,40h ;25MHz mode 0-4(,5,6)ARTTIM db 59h,45h,32h,22h,2fh ;25MHz mode 0-4(,5,6)DRWTIM db 80h,40h,40h,40h,40h ;30MHz mode 0-4(,5,6)ARTTIM db 5dh,47h,43h,32h,3fh ;30MHz mode 0-4(,5,6)DRWTIM db 80h,40h,40h,40h,40h ;33MHz mode 0-4(,5,6)ARTTIM db 6Dh,57h,43h,32h,3fh ;33MHz mode 0-4(,5,6)DRWTIM db 00h,00h,00h,00h,00h ;40MHz mode 0-4(,5,6)ARTTIM db 00h,00h,00h,00h,00h ;40MHz mode 0-4(,5,6)DRWTIM ENDIF ;COMPILE_FOR_SUPERIDE_ASM EQ 2 endif ;COMPILE_FOR_SUPERIDE_ASM ifdef COMPILE_FOR_SUPERIDE_MNU ;*************************************************************************** ;***** Special_Show Special_Show Special_Show Special_Show Special_Show **** ;***** Special_Show Special_Show Special_Show Special_Show Special_Show **** ;***** Special_Show Special_Show Special_Show Special_Show Special_Show **** ;*************************************************************************** IF COMPILE_FOR_SUPERIDE_MNU EQ 2 dw offset CmdIDE_Item, offset Show_CmdIDE_Item ifdef Control_CMD_PIO_OnOff ;R04 dw offset CmdPIO_Item, offset Show_CmdIDE_Item endif ;Control_CMD_PIO_OnOff ;R04 ENDIF ;COMPILE_FOR_SUPERIDE_MNU ;*************************************************************************** ;******* SUPERIO.MNU SUPERIO.MNU SUPERIO.MNU SUPERIO.MNU SUPERIO.MNU ******* ;******* SUPERIO.MNU SUPERIO.MNU SUPERIO.MNU SUPERIO.MNU SUPERIO.MNU ******* ;******* SUPERIO.MNU SUPERIO.MNU SUPERIO.MNU SUPERIO.MNU SUPERIO.MNU ******* ;******* SUPERIO.MNU SUPERIO.MNU SUPERIO.MNU SUPERIO.MNU SUPERIO.MNU ******* ;*************************************************************************** IF COMPILE_FOR_SUPERIDE_MNU EQ 1 ;============ ; 0 : Disabled ;CMD IDE Item ; 1 : Primary ;============ ; 2 : both ; 3 : reserved DEFINE_ITEM CmdIDE_Item menuitem <3,\ offset CmdIdeOn_Str, NOCT,11000000b,IDECMOS,0000000000000011b,\ offset CmdIdeOn_Val,0,2,Xaxis,Yaxis,00000000b, 0000000000000010b,offset Std_Help_Str> ;R04-starts ifdef Control_CMD_PIO_OnOff ;============ ;CMD PIO Item ; 0 : Disabled ;============ ; 1 : Enabled DEFINE_ITEM CmdPIO_Item menuitem <3,\ offset CmdIdePIO_Str, NOCT,00000001b,IDECMOS,0100000000000000b,\ offset Dis_Str,0,1,Xaxis,Yaxis,00000000b, 0000000000000000b,offset Std_Help_Str> ;R04A ;R04A offset CmdIdePIO_Val,0,1,Xaxis,Yaxis,00000000b, 0000000000000000b,offset Std_Help_Str> endif ;Control_CMD_PIO_OnOff ;R04-ends ;================= ;CMD IDE CHANNEL 0 ;================= ;R06 -start ifdef NEW_IDE_MODE_3 public IdeA_Mode_Item IdeA_Mode_Item label near ifdef IDE_PRIMARY_ONLY public IdeB_Mode_Item IdeB_Mode_Item label near endif ;IDE_PRIMARY_ONLY endif ;NEW_IDE_MODE_3 ;R06 -end DEFINE_ITEM CMD_ch0_Mode_Item ;0-7 : Auto , mode 0 - 6 menuitem <3,\ offset Ch0_Str, NOCT,11100000b,IDECMOS,0000000000011100b,\ offset Ch_Val,0,7,Xaxis,Yaxis,00000000b, 0000000000000000b,offset Std_Help_Str> public Ide_mode_diff Ide_mode_diff EQU $ - offset CMD_ch0_Mode_Item ;================= ;CMD IDE CHANNEL 1 ;================= ;R06 - start ifdef NEW_IDE_MODE_3 ifndef IDE_PRIMARY_ONLY public IdeB_Mode_Item IdeB_Mode_Item label near endif ;IDE_PRIMARY_ONLY endif ;NEW_IDE_MODE_3 ;R06 - end ifndef IDE_PRIMARY_ONLY ;R06 DEFINE_ITEM CMD_ch1_Mode_Item ;0-7 : Auto , mode 0 - 6 menuitem <3,\ offset Ch1_Str, NOCT,11100000b,IDECMOS,0000000011100000b,\ offset Ch_Val,0,7,Xaxis,Yaxis,00000000b, 0000000000000000b,offset Std_Help_Str> endif ;IDE_PRIMARY_ONLY ;R06 ;================= ;CMD IDE CHANNEL 2 ;================= ;R06 - start ifdef NEW_IDE_MODE_3 public IdeC_Mode_Item IdeC_Mode_Item label near ifdef IDE_PRIMARY_ONLY public IdeD_Mode_Item IdeD_Mode_Item label near endif ;IDE_PRIMARY_ONLY endif ;NEW_IDE_MODE_3 ;R06 - end DEFINE_ITEM CMD_ch2_Mode_Item ;0-7 : Auto , mode 0 - 6 menuitem <3,\ offset Ch2_Str, NOCT,11100000b,IDECMOS,0000011100000000b,\ offset Ch_Val,0,7,Xaxis,Yaxis,00000000b, 0000000000000000b,offset Std_Help_Str> ;================= ;CMD IDE CHANNEL 3 ;================= ;R06 - start ifdef NEW_IDE_MODE_3 ifndef IDE_PRIMARY_ONLY public IdeD_Mode_Item IdeD_Mode_Item label near endif ;IDE_PRIMARY_ONLY endif ;NEW_IDE_MODE_3 ;R06 - end ifndef IDE_PRIMARY_ONLY ;R06 DEFINE_ITEM CMD_ch3_Mode_Item ;0-7 : Auto , mode 0 - 6 menuitem <3,\ offset Ch3_Str, NOCT,11100000b,IDECMOS,0011100000000000b,\ offset Ch_Val,0,7,Xaxis,Yaxis,00000000b, 0000000000000000b,offset Std_Help_Str> endif ;IDE_PRIMARY_ONLY ;R06 ENDIF ;COMPILE_FOR_SUPERIDE_MNU ;*************************************************************************** ;******* SUPERIO.STR SUPERIO.STR SUPERIO.STR SUPERIO.STR SUPERIO.STR ******* ;******* SUPERIO.STR SUPERIO.STR SUPERIO.STR SUPERIO.STR SUPERIO.STR ******* ;******* SUPERIO.STR SUPERIO.STR SUPERIO.STR SUPERIO.STR SUPERIO.STR ******* ;******* SUPERIO.STR SUPERIO.STR SUPERIO.STR SUPERIO.STR SUPERIO.STR ******* ;*************************************************************************** IF COMPILE_FOR_SUPERIDE_MNU EQ 0 CmdIdeOn_Str db 'Onboard IDE Controller' db (COLLON_LOC - ($-(offset CmdIdeOn_Str))) dup (" ") db ': ',0 CmdIdeOn_Val db 'Disabled',0 db 'Primary ',0 db 'Both ',0 ;R06 db '????????',1 db ' ',1 ;R06 ;R04-starts ifdef Control_CMD_PIO_OnOff CmdIdePIO_Str db 'CMD IDE PIO Mode' db (COLLON_LOC - ($-(offset CmdIdePIO_Str))) dup (" ") db ': ',0 ;R04A CmdIdePIO_Val db 'Disabled',0 ;R04A db 'Enabled ',0 endif ;Control_CMD_PIO_OnOff ;R04-ends ch0_Str db 'IDE Primary Master' db (COLLON_LOC - ($-(offset ch0_Str))) dup (" ") db ': ',0 ifndef IDE_PRIMARY_ONLY ;R06 ch1_Str db 'IDE Primary Slave' db (COLLON_LOC - ($-(offset ch1_Str))) dup (" ") db ': ',0 endif ;IDE_PRIMARY_ONLY ;R06 ch2_Str db 'IDE Secondary Master' db (COLLON_LOC - ($-(offset ch2_Str))) dup (" ") db ': ',0 ifndef IDE_PRIMARY_ONLY ;R06 ch3_Str db 'IDE Secondary Slave' db (COLLON_LOC - ($-(offset ch3_Str))) dup (" ") db ': ',0 endif ;IDE_PRIMARY_ONLY ;R06 ch_Val db 'Auto ',0 db 'Mode 0',0 db 'Mode 1',0 db 'Mode 2',0 db 'Mode 3',0 db 'Mode 4',0 db ' ',1 ;R06 db ' ',1 ;R06 ;R06 db 'Mode 5',1 ;R06 db 'Mode 6',1 Show_CmdIDE_Item Proc Near pusha ;R05 push word ptr ATTRIBUTE[bp] ;R05 push word ptr Cursor_X[bp] ;R05 ;R05 mov di,offset All_Disable_table ;R05 mov cx,4 ;R05 call If_CX_Then_Dis ;show all Item ;R05 - starts ifdef Control_CMD_PIO_OnOff mov bx, offset CmdPIO_Item call Read_Item_Value or dl,dl ;if set Disabled jne short @f ;No,jmp mov di,offset All_Disable_table ;Yes,Disable PIO xor cx,cx ;Mode select item. call If_CX_Then_Dis ;if choose disable , Hide all Item jmp short Show_CmdIDE_Item_Exit @@: endif ;Control_CMD_PIO_OnOff ;R05 - ends mov bx, offset CmdIDE_Item call Read_Item_Value push dx ;R02 cmp dl,0 or dl,dl ;R02 jne short @f mov di,offset All_Disable_table ;R02 mov cx,0 xor cx,cx ;R02 call If_CX_Then_Dis ;if choose disable , Hide all Item @@: pop dx push dx cmp dl,1 jne short @f ;R05 mov di,offset Secondary_Disable_Table ;R05 mov cx,1 ;R05 call If_CX_Then_Dis ;if choose primary , Hide Secondary Item ;R05-starts mov si, offset Re_Enable ;ecpdma_item ifndef IDE_PRIMARY_ONLY ;R06 mov di, offset Re_Enable ;epptype_item endif ;IDE_PRIMARY_ONLY ;R06 mov bx, offset CMD_ch0_Mode_Item call si ifndef IDE_PRIMARY_ONLY ;R06 mov bx, offset CMD_ch1_Mode_Item call di endif ;IDE_PRIMARY_ONLY ;R06 ;R05-ends @@: pop dx ;R05-starts cmp dl,2 jne short @f mov si, offset Re_Enable ;ecpdma_item mov bx, offset CMD_ch0_Mode_Item call si ifndef IDE_PRIMARY_ONLY ;R06 mov si, offset Re_Enable ;ecpdma_item mov bx, offset CMD_ch1_Mode_Item call si endif ;IDE_PRIMARY_ONLY ;R06 mov si, offset Re_Enable ;ecpdma_item mov bx, offset CMD_ch2_Mode_Item call si ifndef IDE_PRIMARY_ONLY ;R06 mov si, offset Re_Enable ;ecpdma_item mov bx, offset CMD_ch3_Mode_Item call si endif ;IDE_PRIMARY_ONLY ;R06 @@: ;R05-ends ;R02 cmp dl,2 ;R02 jne short @f ;R02 ;R02 mov di,offset Primary_Disable_Table ;R02 mov cx,2 ;R02 call If_CX_Then_Dis ;if choose secondary , Hide Primary Item ;R02 @@: ;R04-starts ifdef Control_CMD_PIO_OnOff ;R05 mov bx, offset CmdPIO_Item ;R05 call Read_Item_Value ;R05 or dl,dl ;if set Disabled ;R05 jne short @f ;No,jmp ;R05 ;R05 mov di,offset All_Disable_table ;Yes,Disable PIO ;R05 xor cx,cx ;Mode select item. ;R05 call If_CX_Then_Dis ;if choose disable , Hide all Item ;R05@@: Show_CmdIDE_Item_Exit: ;R05 endif ;Control_CMD_PIO_OnOff ;R04-ends pop word ptr Cursor_X[bp] ;R05 pop word ptr ATTRIBUTE[bp] ;R05 popa ;R05 clc ret Show_CmdIDE_Item Endp All_Disable_Table label word dw offset CMD_ch0_Mode_Item ifndef IDE_PRIMARY_ONLY ;R06 dw offset CMD_ch1_Mode_Item endif ;IDE_PRIMARY_ONLY ;R06 dw offset CMD_ch2_Mode_Item ifndef IDE_PRIMARY_ONLY ;R06 dw offset CMD_ch3_Mode_Item endif ;IDE_PRIMARY_ONLY ;R06 dw -1 ;R02 Primary_Disable_Table label word ;R02 dw offset CMD_ch0_Mode_Item ;R02 dw offset CMD_ch1_Mode_Item ;R02 dw -1 Secondary_Disable_Table label word dw offset CMD_ch2_Mode_Item ifndef IDE_PRIMARY_ONLY ;R06 dw offset CMD_ch3_Mode_Item endif ;IDE_PRIMARY_ONLY ;R06 dw -1 ENDIF ;COMPILE_FOR_SUPERIDE_MNU endif ;COMPILE_FOR_SUPERIDE_MNU endif ;ONBOARD_CMD_IDSEL