source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/MasterSlaveMenu.asm@ 389

Last change on this file since 389 was 376, checked in by gregli@…, 13 years ago

WIDE checkin... Added copyright and license information to sorce files, as per the GPL instructions for usage.

File size: 17.1 KB
Line 
1; Project name : XTIDE Universal BIOS Configurator v2
2; Description : "Master/Slave Drive" menu structs and functions.
3
4;
5; XTIDE Universal BIOS and Associated Tools
6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
7;
8; This program is free software; you can redistribute it and/or modify
9; it under the terms of the GNU General Public License as published by
10; the Free Software Foundation; either version 2 of the License, or
11; (at your option) any later version.
12;
13; This program is distributed in the hope that it will be useful,
14; but WITHOUT ANY WARRANTY; without even the implied warranty of
15; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16; GNU General Public License for more details.
17; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
18;
19
20; Section containing initialized data
21SECTION .data
22
23ALIGN WORD_ALIGN
24g_MenupageForMasterSlaveMenu:
25istruc MENUPAGE
26 at MENUPAGE.fnEnter, dw MasterSlaveMenu_EnterMenuOrModifyItemVisibility
27 at MENUPAGE.fnBack, dw IdeControllerMenu_EnterMenuOrModifyItemVisibility
28 at MENUPAGE.wMenuitems, dw 9
29iend
30
31g_MenuitemMasterSlaveBackToIdeControllerMenu:
32istruc MENUITEM
33 at MENUITEM.fnActivate, dw IdeControllerMenu_EnterMenuOrModifyItemVisibility
34 at MENUITEM.szName, dw g_szItemDrvBackToIde
35 at MENUITEM.szQuickInfo, dw g_szItemDrvBackToIde
36 at MENUITEM.szHelp, dw g_szItemDrvBackToIde
37 at MENUITEM.bFlags, db FLG_MENUITEM_VISIBLE
38 at MENUITEM.bType, db TYPE_MENUITEM_PAGEBACK
39iend
40
41g_MenuitemMasterSlaveBlockModeTransfers:
42istruc MENUITEM
43 at MENUITEM.fnActivate, dw Menuitem_ActivateMultichoiceSelectionForMenuitemInDSSI
44 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI
45 at MENUITEM.szName, dw g_szItemDrvBlockMode
46 at MENUITEM.szQuickInfo, dw g_szNfoDrvBlockMode
47 at MENUITEM.szHelp, dw g_szHelpDrvBlockMode
48 at MENUITEM.bFlags, db FLG_MENUITEM_VISIBLE | FLG_MENUITEM_FLAGVALUE
49 at MENUITEM.bType, db TYPE_MENUITEM_MULTICHOICE
50 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw NULL
51 at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgDrvBlockMode
52 at MENUITEM.itemValue + ITEM_VALUE.szMultichoice, dw g_szMultichoiceBooleanFlag
53 at MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup, dw g_rgszValueToStringLookupForFlagBooleans
54 at MENUITEM.itemValue + ITEM_VALUE.wValueBitmask, dw FLG_DRVPARAMS_BLOCKMODE
55iend
56
57g_MenuitemMasterSlaveWriteCache:
58istruc MENUITEM
59 at MENUITEM.fnActivate, dw Menuitem_ActivateMultichoiceSelectionForMenuitemInDSSI
60 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteLookupValueStringToBufferInESDIfromUnshiftedItemInDSSI
61 at MENUITEM.szName, dw g_szItemDrvWriteCache
62 at MENUITEM.szQuickInfo, dw g_szNfoDrvWriteCache
63 at MENUITEM.szHelp, dw g_szHelpDrvWriteCache
64 at MENUITEM.bFlags, db FLG_MENUITEM_VISIBLE | FLG_MENUITEM_MASKVALUE
65 at MENUITEM.bType, db TYPE_MENUITEM_MULTICHOICE
66 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw NULL
67 at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgDrvWriteCache
68 at MENUITEM.itemValue + ITEM_VALUE.szMultichoice, dw g_szMultichoiseWrCache
69 at MENUITEM.itemValue + ITEM_VALUE.rgwChoiceToValueLookup, dw g_rgwChoiceToValueLookupForWriteCache
70 at MENUITEM.itemValue + ITEM_VALUE.rgszChoiceToStringLookup, dw g_rgszChoiceToStringLookupForWriteCache
71 at MENUITEM.itemValue + ITEM_VALUE.wValueBitmask, dw MASK_DRVPARAMS_WRITECACHE
72iend
73
74g_MenuitemMasterSlaveUserCHS:
75istruc MENUITEM
76 at MENUITEM.fnActivate, dw Menuitem_ActivateMultichoiceSelectionForMenuitemInDSSI
77 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI
78 at MENUITEM.szName, dw g_szItemDrvUserCHS
79 at MENUITEM.szQuickInfo, dw g_szNfoDrvUserCHS
80 at MENUITEM.szHelp, dw g_szHelpDrvUserCHS
81 at MENUITEM.bFlags, db FLG_MENUITEM_VISIBLE | FLG_MENUITEM_MODIFY_MENU | FLG_MENUITEM_FLAGVALUE
82 at MENUITEM.bType, db TYPE_MENUITEM_MULTICHOICE
83 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw NULL
84 at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgDrvUserCHS
85 at MENUITEM.itemValue + ITEM_VALUE.szMultichoice, dw g_szMultichoiceBooleanFlag
86 at MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup, dw g_rgszValueToStringLookupForFlagBooleans
87 at MENUITEM.itemValue + ITEM_VALUE.wValueBitmask, dw FLG_DRVPARAMS_USERCHS
88 at MENUITEM.itemValue + ITEM_VALUE.fnValueWriter, dw MasterSlaveMenu_WriteCHSFlag
89iend
90
91g_MenuitemMasterSlaveCylinders:
92istruc MENUITEM
93 at MENUITEM.fnActivate, dw Menuitem_ActivateUnsignedInputForMenuitemInDSSI
94 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteUnsignedValueStringToBufferInESDIfromItemInDSSI
95 at MENUITEM.szName, dw g_szItemDrvCyls
96 at MENUITEM.szQuickInfo, dw g_szNfoDrvCyls
97 at MENUITEM.szHelp, dw g_szNfoDrvCyls
98 at MENUITEM.bFlags, db NULL
99 at MENUITEM.bType, db TYPE_MENUITEM_UNSIGNED
100 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw NULL
101 at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgDrvCyls
102 at MENUITEM.itemValue + ITEM_VALUE.wMinValue, dw 1
103 at MENUITEM.itemValue + ITEM_VALUE.wMaxValue, dw 16383
104%define MASTERSLAVE_CYLINDERS_DEFAULT 65
105iend
106
107g_MenuitemMasterSlaveHeads:
108istruc MENUITEM
109 at MENUITEM.fnActivate, dw Menuitem_ActivateUnsignedInputForMenuitemInDSSI
110 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteUnsignedValueStringToBufferInESDIfromItemInDSSI
111 at MENUITEM.szName, dw g_szItemDrvHeads
112 at MENUITEM.szQuickInfo, dw g_szNfoDrvHeads
113 at MENUITEM.szHelp, dw g_szNfoDrvHeads
114 at MENUITEM.bFlags, db FLG_MENUITEM_BYTEVALUE
115 at MENUITEM.bType, db TYPE_MENUITEM_UNSIGNED
116 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw NULL
117 at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgDrvHeads
118 at MENUITEM.itemValue + ITEM_VALUE.wMinValue, dw 1
119 at MENUITEM.itemValue + ITEM_VALUE.wMaxValue, dw 16
120%define MASTERSLAVE_HEADS_DEFAULT 16
121iend
122
123g_MenuitemMasterSlaveSectors:
124istruc MENUITEM
125 at MENUITEM.fnActivate, dw Menuitem_ActivateUnsignedInputForMenuitemInDSSI
126 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteUnsignedValueStringToBufferInESDIfromItemInDSSI
127 at MENUITEM.szName, dw g_szItemDrvSect
128 at MENUITEM.szQuickInfo, dw g_szNfoDrvSect
129 at MENUITEM.szHelp, dw g_szNfoDrvSect
130 at MENUITEM.bFlags, db FLG_MENUITEM_BYTEVALUE
131 at MENUITEM.bType, db TYPE_MENUITEM_UNSIGNED
132 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw NULL
133 at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgDrvSect
134 at MENUITEM.itemValue + ITEM_VALUE.wMinValue, dw 1
135 at MENUITEM.itemValue + ITEM_VALUE.wMaxValue, dw 63
136%define MASTERSLAVE_SECTORS_DEFAULT 63
137iend
138
139g_MenuitemMasterSlaveUserLBA:
140istruc MENUITEM
141 at MENUITEM.fnActivate, dw Menuitem_ActivateMultichoiceSelectionForMenuitemInDSSI
142 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI
143 at MENUITEM.szName, dw g_szItemDrvUserLBA
144 at MENUITEM.szQuickInfo, dw g_szNfoDrvUserLBA
145 at MENUITEM.szHelp, dw g_szHelpDrvUserLBA
146 at MENUITEM.bFlags, db FLG_MENUITEM_VISIBLE | FLG_MENUITEM_MODIFY_MENU | FLG_MENUITEM_FLAGVALUE
147 at MENUITEM.bType, db TYPE_MENUITEM_MULTICHOICE
148 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw NULL
149 at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgDrvUserLBA
150 at MENUITEM.itemValue + ITEM_VALUE.szMultichoice, dw g_szMultichoiceBooleanFlag
151 at MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup, dw g_rgszValueToStringLookupForFlagBooleans
152 at MENUITEM.itemValue + ITEM_VALUE.wValueBitmask, dw FLG_DRVPARAMS_USERLBA
153 at MENUITEM.itemValue + ITEM_VALUE.fnValueWriter, dw MasterSlaveMenu_WriteLBAFlag
154iend
155
156g_MenuitemMasterSlaveUserLbaValue:
157istruc MENUITEM
158 at MENUITEM.fnActivate, dw Menuitem_ActivateUnsignedInputForMenuitemInDSSI
159 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteUnsignedValueStringToBufferInESDIfromItemInDSSI
160 at MENUITEM.szName, dw g_szItemDrvLbaSectors
161 at MENUITEM.szQuickInfo, dw g_szNfoDrvLbaSectors
162 at MENUITEM.szHelp, dw g_szNfoDrvLbaSectors
163 at MENUITEM.bFlags, db NULL
164 at MENUITEM.bType, db TYPE_MENUITEM_UNSIGNED
165 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw NULL
166 at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgDrvLbaSectors
167 at MENUITEM.itemValue + ITEM_VALUE.wMinValue, dw 1 ; 512 MiB
168 at MENUITEM.itemValue + ITEM_VALUE.wMaxValue, dw 10000000h / (1024 * 1024) ; Limit to 28-bit LBA
169 at MENUITEM.itemValue + ITEM_VALUE.fnValueReader, dw ValueReaderForUserLbaValue
170 at MENUITEM.itemValue + ITEM_VALUE.fnValueWriter, dw ValueWriterForUserLbaValue
171%define MASTERSLAVE_USERLBA_DEFAULT 1
172iend
173
174
175g_rgwChoiceToValueLookupForWriteCache:
176 dw DEFAULT_WRITE_CACHE
177 dw DISABLE_WRITE_CACHE
178 dw ENABLE_WRITE_CACHE
179
180g_rgszChoiceToStringLookupForWriteCache:
181 dw g_szValueBootDispModeDefault
182 dw g_szValueDrvWrCaDis
183 dw g_szValueDrvWrCaEn
184
185
186; Section containing code
187SECTION .text
188
189;--------------------------------------------------------------------
190; MasterSlaveMenu_InitializeToDrvparamsOffsetInBX
191; Parameters:
192; SS:BP: Menu handle
193; Returns:
194; Nothing
195; Corrupts registers:
196; AX
197;--------------------------------------------------------------------
198ALIGN JUMP_ALIGN
199MasterSlaveMenu_InitializeToDrvparamsOffsetInBX:
200 lea ax, [bx+DRVPARAMS.wFlags]
201 mov [cs:g_MenuitemMasterSlaveBlockModeTransfers+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
202 mov [cs:g_MenuitemMasterSlaveWriteCache+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
203 mov [cs:g_MenuitemMasterSlaveUserCHS+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
204 mov [cs:g_MenuitemMasterSlaveUserLBA+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
205
206 lea ax, [bx+DRVPARAMS.wCylinders]
207 mov [cs:g_MenuitemMasterSlaveCylinders+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
208
209 lea ax, [bx+DRVPARAMS.bHeads]
210 mov [cs:g_MenuitemMasterSlaveHeads+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
211
212 lea ax, [bx+DRVPARAMS.bSect]
213 mov [cs:g_MenuitemMasterSlaveSectors+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
214
215 lea ax, [bx+DRVPARAMS.dwMaximumLBA]
216 mov [cs:g_MenuitemMasterSlaveUserLbaValue+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
217 ret
218
219
220;--------------------------------------------------------------------
221; MasterSlaveMenu_EnterMenuOrModifyItemVisibility
222; Parameters:
223; SS:BP: Menu handle
224; Returns:
225; Nothing
226; Corrupts registers:
227; All, except BP
228;--------------------------------------------------------------------
229ALIGN JUMP_ALIGN
230MasterSlaveMenu_EnterMenuOrModifyItemVisibility:
231 push cs
232 pop ds
233 call .EnableOrDisableUserCHSandLBA
234 call .EnableOrDisableCHandS
235 call .EnableOrDisableUserLbaValue
236 mov si, g_MenupageForMasterSlaveMenu
237 jmp Menupage_ChangeToNewMenupageInDSSI
238
239
240;--------------------------------------------------------------------
241; .EnableOrDisableUserCHSandLBA
242; Parameters:
243; SS:BP: Menu handle
244; Returns:
245; Nothing
246; Corrupts registers:
247; AX, BX
248;--------------------------------------------------------------------
249ALIGN JUMP_ALIGN
250.EnableOrDisableUserCHSandLBA:
251 mov bx, [g_MenuitemMasterSlaveUserLBA+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
252 call Buffers_GetRomvarsValueToAXfromOffsetInBX
253 test ax, FLG_DRVPARAMS_USERLBA
254 jnz SHORT .DisableCHSandEnableLBA
255 test ax, FLG_DRVPARAMS_USERCHS
256 jnz SHORT .EnableCHSandDisableLBA
257
258 ; Enable both
259 mov bx, g_MenuitemMasterSlaveUserCHS
260 call .EnableMenuitemFromCSBX
261 mov bx, g_MenuitemMasterSlaveUserLBA
262 jmp .EnableMenuitemFromCSBX
263
264ALIGN JUMP_ALIGN
265.EnableCHSandDisableLBA:
266 mov bx, g_MenuitemMasterSlaveUserCHS
267 call .EnableMenuitemFromCSBX
268 mov bx, g_MenuitemMasterSlaveUserLBA
269 jmp .DisableMenuitemFromCSBX
270
271ALIGN JUMP_ALIGN
272.DisableCHSandEnableLBA:
273 mov bx, g_MenuitemMasterSlaveUserLBA
274 call .EnableMenuitemFromCSBX
275 mov bx, g_MenuitemMasterSlaveUserCHS
276 jmp .DisableMenuitemFromCSBX
277
278
279;--------------------------------------------------------------------
280; .EnableOrDisableCHandS
281; Parameters:
282; SS:BP: Menu handle
283; Returns:
284; Nothing
285; Corrupts registers:
286; AX, BX
287;--------------------------------------------------------------------
288ALIGN JUMP_ALIGN
289.EnableOrDisableCHandS:
290 mov bx, [cs:g_MenuitemMasterSlaveUserCHS+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
291 call Buffers_GetRomvarsValueToAXfromOffsetInBX
292 test ax, FLG_DRVPARAMS_USERCHS
293 jz SHORT .DisableCHandS
294 test ax, FLG_DRVPARAMS_USERLBA
295 jnz SHORT .DisableCHandS
296
297 mov bx, g_MenuitemMasterSlaveCylinders
298 call .EnableMenuitemFromCSBX
299 mov bx, g_MenuitemMasterSlaveHeads
300 call .EnableMenuitemFromCSBX
301 mov bx, g_MenuitemMasterSlaveSectors
302 jmp SHORT .EnableMenuitemFromCSBX
303
304ALIGN JUMP_ALIGN
305.DisableCHandS:
306 mov bx, g_MenuitemMasterSlaveCylinders
307 call .DisableMenuitemFromCSBX
308 mov bx, g_MenuitemMasterSlaveHeads
309 call .DisableMenuitemFromCSBX
310 mov bx, g_MenuitemMasterSlaveSectors
311 jmp SHORT .DisableMenuitemFromCSBX
312
313
314;--------------------------------------------------------------------
315; .EnableOrDisableUserLbaValue
316; Parameters:
317; SS:BP: Menu handle
318; Returns:
319; Nothing
320; Corrupts registers:
321; AX, BX
322;--------------------------------------------------------------------
323ALIGN JUMP_ALIGN
324.EnableOrDisableUserLbaValue:
325 mov bx, [cs:g_MenuitemMasterSlaveUserLBA+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
326 call Buffers_GetRomvarsValueToAXfromOffsetInBX
327 mov bx, g_MenuitemMasterSlaveUserLbaValue
328 test ax, FLG_DRVPARAMS_USERCHS
329 jnz SHORT .DisableMenuitemFromCSBX
330 test ax, FLG_DRVPARAMS_USERLBA
331 jz SHORT .DisableMenuitemFromCSBX
332 ; Fall to .EnableMenuitemFromCSBX
333
334
335;--------------------------------------------------------------------
336; .EnableMenuitemFromCSBX
337; .DisableMenuitemFromCSBX
338; Parameters:
339; CS:BX: Ptr to MENUITEM
340; Returns:
341; Nothing
342; Corrupts registers:
343; Nothing
344;--------------------------------------------------------------------
345ALIGN JUMP_ALIGN
346.EnableMenuitemFromCSBX:
347 or BYTE [cs:bx+MENUITEM.bFlags], FLG_MENUITEM_VISIBLE
348 ret
349
350ALIGN JUMP_ALIGN
351.DisableMenuitemFromCSBX:
352 and BYTE [cs:bx+MENUITEM.bFlags], ~FLG_MENUITEM_VISIBLE
353 ret
354
355
356;--------------------------------------------------------------------
357; MENUITEM value reader functions
358; Parameters:
359; AX: Value from MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset
360; DS:SI: Ptr to MENUITEM
361; ES:DI: Ptr to value variable
362; Returns:
363; AX: Value with possible modifications
364; Corrupts registers:
365; Nothing
366;--------------------------------------------------------------------
367ALIGN JUMP_ALIGN
368ValueReaderForUserLbaValue:
369 push dx
370
371 mov ax, [es:di]
372 mov dx, [es:di+2] ; DX:AX now holds user defined LBA28 limit
373 add ax, BYTE 1 ; Increment by one
374 adc dx, BYTE 0
375
376 xchg ax, dx ; SHR 16
377 eSHIFT_IM ax, 4, shr ; SHR 4 => AX = DX:AX / (1024*1024)
378
379 pop dx
380 ret
381
382
383;--------------------------------------------------------------------
384; MENUITEM value writer functions
385; Parameters:
386; AX: Value to be written to MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset
387; DS:SI: Ptr to MENUITEM
388; ES:DI: Ptr to value variable
389; Returns:
390; AX: Value to be stored
391; Corrupts registers:
392; Nothing
393;--------------------------------------------------------------------
394ALIGN JUMP_ALIGN
395ValueWriterForUserLbaValue:
396 push dx
397
398 xor dx, dx
399 eSHIFT_IM ax, 4, shl
400 xchg dx, ax ; DX:AX now holds AX * 1024 * 1024
401
402 sub ax, BYTE 1 ; Decrement DX:AX by one
403 sbb dx, BYTE 0 ; (necessary since maximum LBA28 sector count is 0FFF FFFFh)
404
405 mov [es:di+2], dx ; Store DX by ourselves
406 pop dx
407 ret ; AX will be stored by our menu system
408
409;
410; No change to CHS flag, but we use this opportunity to change defaults stored in the CHS values if we are
411; changing in/out of user CHS settings (since we use these bytes in different ways with the LBA setting).
412;
413ALIGN JUMP_ALIGN
414MasterSlaveMenu_WriteCHSFlag:
415 test word [es:di], FLG_DRVPARAMS_USERCHS
416 jnz .alreadySet
417
418 push ax
419 push di
420 push si
421
422 mov ax, MASTERSLAVE_CYLINDERS_DEFAULT
423 mov si, g_MenuitemMasterSlaveCylinders
424 call Menuitem_StoreValueFromAXtoMenuitemInDSSI
425
426 mov ax, MASTERSLAVE_HEADS_DEFAULT
427 mov si, g_MenuitemMasterSlaveHeads
428 call Menuitem_StoreValueFromAXtoMenuitemInDSSI
429
430 mov ax, MASTERSLAVE_SECTORS_DEFAULT
431 mov si, g_MenuitemMasterSlaveSectors
432 call Menuitem_StoreValueFromAXtoMenuitemInDSSI
433
434 pop si
435 pop di
436 pop ax
437
438.alreadySet:
439 ret
440
441;
442; No change to LBA flag, but we use this opportunity to change defaults stored in the LBA value if we are
443; changing in/out of user LBA settings (since we use these bytes in different ways with the CHS setting).
444;
445ALIGN JUMP_ALIGN
446MasterSlaveMenu_WriteLBAFlag:
447 test word [es:di], FLG_DRVPARAMS_USERLBA
448 jnz .alreadySet
449
450 push ax
451 push di
452 push si
453
454 mov ax, MASTERSLAVE_USERLBA_DEFAULT
455 mov si, g_MenuitemMasterSlaveUserLbaValue
456 call Menuitem_StoreValueFromAXtoMenuitemInDSSI
457
458 pop si
459 pop di
460 pop ax
461
462.alreadySet:
463 ret
Note: See TracBrowser for help on using the repository browser.