Changeset 148 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH24h_HSetBlocks.asm
- Timestamp:
- Mar 19, 2011, 8:09:41 PM (14 years ago)
- google:author:
- aitotat
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH24h_HSetBlocks.asm
r84 r148 1 ; File name : AH24h_HSetBlocks.asm 2 ; Project name : IDE BIOS 3 ; Created date : 28.12.2009 4 ; Last update : 14.1.2011 5 ; Author : Tomi Tilli, 6 ; : Krister Nordvall (optimizations) 1 ; Project name : XTIDE Universal BIOS 7 2 ; Description : Int 13h function AH=24h, Set Multiple Blocks. 8 3 … … 15 10 ; AH24h_HandlerForSetMultipleBlocks 16 11 ; Parameters: 17 ; AH: Bios function 24h 12 ; AL: Same as in INTPACK 13 ; DL: Translated Drive number 14 ; DS:DI: Ptr to DPT (in RAMVARS segment) 15 ; SS:BP: Ptr to INTPACK 16 ; Parameters on INTPACK in SS:BP: 18 17 ; AL: Number of Sectors per Block (1, 2, 4, 8, 16, 32, 64 or 128) 19 ; DL: Drive number 20 ; Parameters loaded by Int13h_Jump: 21 ; DS: RAMVARS segment 22 ; Returns: 18 ; Returns with INTPACK in SS:BP: 23 19 ; AH: Int 13h return status 24 20 ; CF: 0 if succesfull, 1 if error 25 ; IF: 126 ; Corrupts registers:27 ; Flags28 21 ;-------------------------------------------------------------------- 29 22 ALIGN JUMP_ALIGN 30 23 AH24h_HandlerForSetMultipleBlocks: 31 push dx32 push cx33 push bx34 push ax35 24 %ifndef USE_186 36 25 call AH24h_SetBlockSize 37 jmp Int13h_ PopXRegsAndReturn26 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH 38 27 %else 39 push Int13h_ PopXRegsAndReturn28 push Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH 40 29 ; Fall through to AH24h_SetBlockSize 41 30 %endif … … 48 37 ; Parameters: 49 38 ; AL: Number of Sectors per Block (1, 2, 4, 8, 16, 32, 64 or 128) 50 ; DL: Drive number 51 ; DS: RAMVARS segment 39 ; DS:DI: Ptr to DPT (in RAMVARS segment) 52 40 ; Returns: 53 ; DS:DI: Ptr to DPT54 41 ; AH: Int 13h return status 55 42 ; CF: 0 if succesfull, 1 if error 56 43 ; Corrupts registers: 57 ; AL, BX, CX, DX , DI44 ; AL, BX, CX, DX 58 45 ;-------------------------------------------------------------------- 59 46 ALIGN JUMP_ALIGN … … 61 48 ; Select Master or Slave and wait until ready 62 49 mov bl, al ; Backup block size 63 call FindDPT_ForDriveNumber ; DS:DI now points to DPT64 50 call HDrvSel_SelectDriveAndDisableIRQ ; Select drive and wait until ready 65 jc SHORT .Return 51 jc SHORT .ReturnWithErrorCodeInAH ; Return if error 66 52 67 53 ; Output block size and command … … 80 66 .DisableBlockMode: 81 67 mov BYTE [di+DPT.bSetBlock], 1 ; Disable block mode 82 .Return :68 .ReturnWithErrorCodeInAH: 83 69 ret
Note:
See TracChangeset
for help on using the changeset viewer.