Changeset 158 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h
- Timestamp:
- May 2, 2011, 9:41:51 AM (14 years ago)
- google:author:
- aitotat
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH24h_HSetBlocks.asm
r150 r158 22 22 ALIGN JUMP_ALIGN 23 23 AH24h_HandlerForSetMultipleBlocks: 24 test WORD [di+DPT.wFlags], FLG_DPT_BLOCK_MODE_SUPPORTED24 test BYTE [di+DPT.bFlagsHigh], FLGH_DPT_BLOCK_MODE_SUPPORTED 25 25 jnz SHORT .TryToSetBlockMode 26 26 stc -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH2h_HRead.asm
r155 r158 28 28 ALIGN JUMP_ALIGN 29 29 AH2h_HandlerForReadDiskSectors: 30 call AH2h_ExitInt13hIfSectorCountInIntpackIsZero 30 cmp BYTE [bp+IDEPACK.intpack+INTPACK.al], 0 31 je SHORT AH2h_ExitInt13hSinceSectorCountInIntpackIsZero 32 31 33 mov ah, COMMAND_READ_SECTORS ; Load sector mode command 32 test WORD [di+DPT.wFlags], FLG_DPT_BLOCK_MODE_SUPPORTED34 test BYTE [di+DPT.bFlagsHigh], FLGH_DPT_BLOCK_MODE_SUPPORTED 33 35 eCMOVNZ ah, COMMAND_READ_MULTIPLE ; Load block mode command 34 36 mov bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRQ) … … 44 46 45 47 ;-------------------------------------------------------------------- 46 ; AH2h_ExitInt13h IfSectorCountInIntpackIsZero48 ; AH2h_ExitInt13hSinceSectorCountInIntpackIsZero 47 49 ; Parameters: 48 ; SS:BP: Ptr to IDEPACK 49 ; Parameters on INTPACK: 50 ; AL: Number of sectors to transfer (1...255) 50 ; Nothing 51 51 ; Returns: 52 ; Nothing (does not return if error) 53 ; Corrupts registers: 54 ; Nothing 52 ; Jumps to Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH 55 53 ;-------------------------------------------------------------------- 56 ALIGN JUMP_ALIGN 57 AH2h_ExitInt13hIfSectorCountInIntpackIsZero: 58 cmp BYTE [bp+IDEPACK.intpack+INTPACK.al], 0 59 je SHORT .InvalidSectorCount 60 ret 61 .InvalidSectorCount: 54 AH2h_ExitInt13hSinceSectorCountInIntpackIsZero: 62 55 mov ah, RET_HD_INVALID 63 56 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH3h_HWrite.asm
r155 r158 27 27 ALIGN JUMP_ALIGN 28 28 AH3h_HandlerForWriteDiskSectors: 29 call AH2h_ExitInt13hIfSectorCountInIntpackIsZero 29 cmp BYTE [bp+IDEPACK.intpack+INTPACK.al], 0 30 je SHORT AH2h_ExitInt13hSinceSectorCountInIntpackIsZero 31 30 32 mov ah, COMMAND_WRITE_SECTORS ; Load sector mode command 31 test WORD [di+DPT.wFlags], FLG_DPT_BLOCK_MODE_SUPPORTED33 test BYTE [di+DPT.bFlagsHigh], FLGH_DPT_BLOCK_MODE_SUPPORTED 32 34 eCMOVNZ ah, COMMAND_WRITE_MULTIPLE ; Load block mode command 33 35 mov bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRQ) -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH4h_HVerify.asm
r155 r158 26 26 ALIGN JUMP_ALIGN 27 27 AH4h_HandlerForVerifyDiskSectors: 28 call AH2h_ExitInt13hIfSectorCountInIntpackIsZero 28 cmp BYTE [bp+IDEPACK.intpack+INTPACK.al], 0 29 je SHORT AH2h_ExitInt13hSinceSectorCountInIntpackIsZero 30 29 31 mov ah, COMMAND_VERIFY_SECTORS 30 32 mov bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRDY) -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm
r157 r158 46 46 47 47 ; Try to select drive and wait until ready 48 or WORD [di+DPT.wFlags], MASK_DPT_RESET ; Everything uninitialized48 or BYTE [di+DPT.bFlagsHigh], MASKH_DPT_RESET ; Everything uninitialized 49 49 call AccessDPT_GetDriveSelectByteToAL 50 50 mov [bp+IDEPACK.bDrvAndHead], al 51 51 call Device_SelectDrive 52 52 jc SHORT .ReturnNotSuccessfull 53 and WORD [di+DPT.wFlags], ~FLG_DPT_RESET_nDRDY ; Clear since success53 and BYTE [di+DPT.bFlagsHigh], ~FLGH_DPT_RESET_nDRDY ; Clear since success 54 54 55 55 ; Initialize CHS parameters if LBA is not used 56 56 call InitializeDeviceParameters 57 57 jc SHORT .RecalibrateDrive 58 and WORD [di+DPT.wFlags], ~FLG_DPT_RESET_nINITPRMS58 and BYTE [di+DPT.bFlagsHigh], ~FLGH_DPT_RESET_nINITPRMS 59 59 60 60 ; Recalibrate drive by seeking to cylinder 0 … … 62 62 call AH11h_RecalibrateDrive 63 63 jc SHORT .InitializeBlockMode 64 and WORD [di+DPT.wFlags], ~FLG_DPT_RESET_nRECALIBRATE64 and BYTE [di+DPT.bFlagsHigh], ~FLGH_DPT_RESET_nRECALIBRATE 65 65 66 66 ; Initialize block mode transfers … … 68 68 call InitializeBlockMode 69 69 jc SHORT .ReturnNotSuccessfull 70 and WORD [di+DPT.wFlags], ~FLG_DPT_RESET_nSETBLOCK ; Keeps CF clear70 and BYTE [di+DPT.bFlagsHigh], ~FLGH_DPT_RESET_nSETBLOCK ; Keeps CF clear 71 71 72 72 .ReturnNotSuccessfull: … … 90 90 InitializeDeviceParameters: 91 91 ; No need to initialize CHS parameters if LBA mode enabled 92 test BYTE [di+DPT. wFlags], FLG_DRVNHEAD_LBA ; Clear CF92 test BYTE [di+DPT.bFlagsLow], FLG_DRVNHEAD_LBA ; Clear CF 93 93 jnz SHORT ReturnSuccessSinceInitializationNotNeeded 94 94 … … 115 115 ALIGN JUMP_ALIGN 116 116 InitializeBlockMode: 117 test WORD [di+DPT.wFlags], FLG_DPT_BLOCK_MODE_SUPPORTED ; Clear CF117 test BYTE [di+DPT.bFlagsHigh], FLGH_DPT_BLOCK_MODE_SUPPORTED ; Clear CF 118 118 jz SHORT ReturnSuccessSinceInitializationNotNeeded 119 119 -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Address.asm
r155 r158 89 89 ; (LCylinder << n) + (LHead / PHeadCount) 90 90 mov dx, cx ; Copy L-CHS Cylinder number to DX 91 mov cl, [di+DPT. wFlags]; Load shift count92 and cl, MASK _DPT_CHS_SHIFT_COUNT91 mov cl, [di+DPT.bFlagsLow] ; Load shift count 92 and cl, MASKL_DPT_CHS_SHIFT_COUNT 93 93 shl dx, cl ; DX = LCylinder << n 94 94 add ax, dx ; AX = P-CHS Cylinder number
Note:
See TracChangeset
for help on using the changeset viewer.