Changeset 167 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools
- Timestamp:
- Aug 21, 2011, 3:42:15 PM (13 years ago)
- google:author:
- aitotat@gmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/CommandLookup.asm
r165 r167 7 7 ;-------------------------------------------------------------------- 8 8 ; CommandLookup_GetEbiosIndexToBX 9 ; CommandLookup_OrOldInt13hIndexToBL10 9 ; Parameters: 11 10 ; DS:DI: Ptr to DPT … … 14 13 ; BX: Index to command lookup table 15 14 ; Corrupts registers: 16 ; AX 15 ; AX, DX 17 16 ;-------------------------------------------------------------------- 18 17 ALIGN JUMP_ALIGN 19 18 CommandLookup_GetEbiosIndexToBX: 20 19 ; LBA28 or LBA48 command 21 xor bx, bx 22 mov ax, [es:si+DAP.qwLBA+3] ; Load LBA48 bytes 3 and 4 23 and al, ~0Fh ; Clear LBA28 bits 24...27 24 or al, [es:si+DAP.qwLBA+5] 25 cmp bx, ax ; Set CF if any of bits 28...47 set 26 rcl bx, 1 ; BX = 0 for LBA28, BX = 1 for LBA48 20 xor dx, dx 21 mov al, [es:si+DAP.qwLBA+3] ; Load LBA48 byte 3 (bits 24...31) 22 and ax, 00F0h ; Clear LBA28 bits 24...27 23 or ax, [es:si+DAP.qwLBA+4] ; Set bits from LBA bytes 4 and 5 24 cmp dx, ax ; Set CF if any of bits 28...47 set 25 rcl dx, 1 ; DX = 0 for LBA28, DX = 1 for LBA48 26 call CommandLookup_GetOldInt13hIndexToBX 27 or bx, dx ; Set block mode / single sector bit 28 ret 27 29 30 ;-------------------------------------------------------------------- 31 ; CommandLookup_GetOldInt13hIndexToBX 32 ; Parameters: 33 ; DS:DI: Ptr to DPT 34 ; Returns: 35 ; BX: Index to command lookup table 36 ; Corrupts registers: 37 ; Nothing 38 ;-------------------------------------------------------------------- 39 ALIGN JUMP_ALIGN 40 CommandLookup_GetOldInt13hIndexToBX: 28 41 ; Block mode or single sector 29 ALIGN JUMP_ALIGN 30 CommandLookup_OrOldInt13hIndexToBL: 31 mov al, FLGH_DPT_BLOCK_MODE_SUPPORTED ; Bit 1 32 and al, [di+DPT.bFlagsHigh] 33 or bl, al ; BX = index to lookup table 42 mov bl, [di+DPT.bFlagsHigh] 43 and bx, BYTE FLGH_DPT_BLOCK_MODE_SUPPORTED ; Bit 1 34 44 ret 35 45 … … 52 62 db COMMAND_VERIFY_SECTORS 53 63 db COMMAND_VERIFY_SECTORS_EXT 54
Note:
See TracChangeset
for help on using the changeset viewer.