Changeset 345 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages
- Timestamp:
- Mar 14, 2012, 7:01:44 PM (13 years ago)
- google:author:
- aitotat@gmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/MasterSlaveMenu.asm
r293 r345 345 345 ALIGN JUMP_ALIGN 346 346 ValueReaderForUserLbaValue: 347 mov ax, [es:di+2] ; SHR 16 348 eSHIFT_IM ax, 4, shr ; SHR 16 + 4 = 20 347 push dx 348 349 mov ax, [es:di] 350 mov dx, [es:di+2] ; DX:AX now holds user defined LBA28 limit 351 add ax, BYTE 1 ; Increment by one 352 adc dx, BYTE 0 353 354 xchg ax, dx ; SHR 16 355 eSHIFT_IM ax, 4, shr ; SHR 4 => AX = DX:AX / (1024*1024) 356 357 pop dx 349 358 ret 350 359 … … 363 372 ALIGN JUMP_ALIGN 364 373 ValueWriterForUserLbaValue: 374 push dx 375 376 xor dx, dx 365 377 eSHIFT_IM ax, 4, shl 366 mov [es:di+2], ax 367 xor ax, ax ; Store zero to [es:di] 368 ret 378 xchg dx, ax ; DX:AX now holds AX * 1024 * 1024 379 380 sub ax, BYTE 1 ; Decrement DX:AX by one 381 sbb dx, BYTE 0 ; (necessary since maximum LBA28 sector count is 0FFF FFFFh) 382 383 mov [es:di+2], dx ; Store DX by ourselves 384 pop dx 385 ret ; AX will be stored by our menu system
Note:
See TracChangeset
for help on using the changeset viewer.