Changeset 169 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h
- Timestamp:
- Aug 21, 2011, 4:39:58 PM (13 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH2h_HRead.asm
r167 r169 15 15 ; SS:BP: Ptr to IDEPACK 16 16 ; Parameters on INTPACK: 17 ; AL: Number of sectors to read (1... 127)17 ; AL: Number of sectors to read (1...255, 0=256) 18 18 ; CH: Cylinder number, bits 7...0 19 19 ; CL: Bits 7...6: Cylinder number bits 9 and 8 … … 28 28 ALIGN JUMP_ALIGN 29 29 AH2h_HandlerForReadDiskSectors: 30 cmp al, 031 jle SHORT AH2h_ExitInt13hSinceSectorCountInIntpackIsZero32 33 30 call CommandLookup_GetOldInt13hIndexToBX 34 31 mov ah, [cs:bx+g_rgbReadCommandLookup] … … 42 39 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH 43 40 %endif 44 45 46 ;--------------------------------------------------------------------47 ; AH2h_ExitInt13hSinceSectorCountInIntpackIsZero48 ; Parameters:49 ; Nothing50 ; Returns:51 ; Jumps to Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH52 ;--------------------------------------------------------------------53 AH2h_ExitInt13hSinceSectorCountInIntpackIsZero:54 mov ah, RET_HD_INVALID55 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH3h_HWrite.asm
r167 r169 15 15 ; SS:BP: Ptr to IDEREGS_AND_INTPACK 16 16 ; Parameters on INTPACK: 17 ; AL: Number of sectors to write (1... 127)17 ; AL: Number of sectors to write (1...255, 0=256) 18 18 ; CH: Cylinder number, bits 7...0 19 19 ; CL: Bits 7...6: Cylinder number bits 9 and 8 … … 27 27 ALIGN JUMP_ALIGN 28 28 AH3h_HandlerForWriteDiskSectors: 29 cmp al, 030 jle SHORT AH2h_ExitInt13hSinceSectorCountInIntpackIsZero31 32 29 call CommandLookup_GetOldInt13hIndexToBX 33 30 mov ah, [cs:bx+g_rgbWriteCommandLookup] -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH4h_HVerify.asm
r167 r169 15 15 ; SS:BP: Ptr to INTPACK 16 16 ; Parameters on INTPACK in SS:BP: 17 ; AL: Number of sectors to verify (1... 127)17 ; AL: Number of sectors to verify (1...255, 0=256) 18 18 ; CH: Cylinder number, bits 7...0 19 19 ; CL: Bits 7...6: Cylinder number bits 9 and 8 … … 26 26 ALIGN JUMP_ALIGN 27 27 AH4h_HandlerForVerifyDiskSectors: 28 cmp al, 029 jle SHORT AH2h_ExitInt13hSinceSectorCountInIntpackIsZero30 31 28 mov ah, COMMAND_VERIFY_SECTORS 32 29 mov bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRDY) -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH42h_ExtendedReadSectors.asm
r167 r169 54 54 mov es, [bp+IDEPACK.intpack+INTPACK.ds] ; ES:SI to point Disk Address Packet 55 55 cmp BYTE [es:si+DAP.bSize], MINIMUM_DAP_SIZE 56 jb SHORT .DapContentsNotValid56 jb SHORT AH42h_ReturnWithInvalidFunctionError 57 57 cmp WORD [es:si+DAP.wSectorCount], BYTE 0 58 j le SHORT .DapContentsNotValid ; Must be 1...12758 je SHORT AH42h_ReturnWithInvalidFunctionError 59 59 ret 60 .DapContentsNotValid: 61 jmp AH2h_ExitInt13hSinceSectorCountInIntpackIsZero 60 AH42h_ReturnWithInvalidFunctionError: 61 mov ah, RET_HD_INVALID 62 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH43h_ExtendedWriteSectors.asm
r165 r169 27 27 AH43h_HandlerForExtendedWriteSectors: 28 28 cmp BYTE [bp+IDEPACK.intpack+INTPACK.al], 2 ; Verify requested? 29 jae SHORT .WriteWithVerifyNotSupported29 jae SHORT AH42h_ReturnWithInvalidFunctionError 30 30 31 31 call AH42h_LoadDapToESSIandVerifyForTransfer … … 40 40 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH 41 41 %endif 42 43 .WriteWithVerifyNotSupported:44 jmp AH2h_ExitInt13hSinceSectorCountInIntpackIsZero -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH47h_ExtendedSeek.asm
r165 r169 25 25 mov es, [bp+IDEPACK.intpack+INTPACK.ds] ; ES:SI to point Disk Address Packet 26 26 cmp BYTE [es:si+DAP.bSize], MINIMUM_DAP_SIZE 27 jb SHORT .DapContentsNotValid27 jb SHORT AH42h_ReturnWithInvalidFunctionError 28 28 29 29 mov ah, COMMAND_SEEK … … 36 36 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH 37 37 %endif 38 39 .DapContentsNotValid:40 jmp AH2h_ExitInt13hSinceSectorCountInIntpackIsZero -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH48h_GetExtendedDriveParameters.asm
r167 r169 34 34 call AH25h_GetDriveInformationToBufferInESSI 35 35 jc SHORT .ReturnWithError 36 call AtaID_GetTotalSectorCountToBXDXAXfromAtaInfoInESSI37 xchg cx, ax ; Sector count now in BX:DX:CX38 36 39 ; Point ES:DI to Destination buffer37 ; Point DS:DI to Destination buffer 40 38 mov di, [bp+IDEPACK.intpack+INTPACK.si] 41 mov es, [bp+IDEPACK.intpack+INTPACK.ds]39 mov ds, [bp+IDEPACK.intpack+INTPACK.ds] 42 40 mov ax, MINIMUM_EDRIVEINFO_SIZE 43 cmp WORD [ es:di+EDRIVE_INFO.wSize], ax44 jb SHORT .BufferTooSmall41 cmp WORD [di+EDRIVE_INFO.wSize], ax 42 jb SHORT AH42h_ReturnWithInvalidFunctionError 45 43 je SHORT .SkipEddConfigurationParameters 46 44 … … 48 46 xor ax, ax 49 47 dec ax ; AX = FFFFh 50 mov [ es:di+EDRIVE_INFO.fpEDDparams], ax51 mov [ es:di+EDRIVE_INFO.fpEDDparams+2], ax48 mov [di+EDRIVE_INFO.fpEDDparams], ax 49 mov [di+EDRIVE_INFO.fpEDDparams+2], ax 52 50 mov ax, EDRIVE_INFO_size 53 51 54 ; Fill Extended Drive Information Table in ES:DI52 ; Fill Extended Drive Information Table in DS:DI 55 53 .SkipEddConfigurationParameters: 56 stosw ; Store Extended Drive Information Table size 57 mov al, FLG_DMA_BOUNDARY_ERRORS_HANDLED_BY_BIOS 58 stosw 59 add di, BYTE 12 ; Skip CHS parameters 60 xchg ax, cx 61 stosw ; LBA WORD 0 62 xchg ax, dx 63 stosw ; LBA WORD 1 64 xchg ax, bx 65 stosw ; LBA WORD 2 66 xor ax, ax 67 stosw ; LBA WORD 3 always zero since 48-bit address 68 mov ah, 512>>8 69 stosw ; Always 512-byte sectors 54 mov [di+EDRIVE_INFO.wSize], ax 55 mov WORD [di+EDRIVE_INFO.wFlags], FLG_DMA_BOUNDARY_ERRORS_HANDLED_BY_BIOS | FLG_CHS_INFORMATION_IS_VALID 56 57 call AtaID_GetPCHStoAXBLBHfromAtaInfoInESSI 58 xor cx, cx 59 mov [di+EDRIVE_INFO.dwCylinders], ax 60 mov [di+EDRIVE_INFO.dwCylinders+2], cx 61 eMOVZX ax, bl 62 mov [di+EDRIVE_INFO.dwHeads], ax 63 mov [di+EDRIVE_INFO.dwHeads+2], cx 64 mov al, bh 65 mov [di+EDRIVE_INFO.dwSectorsPerTrack], ax 66 mov [di+EDRIVE_INFO.dwSectorsPerTrack+2], cx 67 68 call AtaID_GetTotalSectorCountToBXDXAXfromAtaInfoInESSI 69 mov [di+EDRIVE_INFO.qwTotalSectors], ax 70 mov [di+EDRIVE_INFO.qwTotalSectors+2], dx 71 mov [di+EDRIVE_INFO.qwTotalSectors+4], bx 72 mov [di+EDRIVE_INFO.qwTotalSectors+6], cx 73 74 mov WORD [di+EDRIVE_INFO.wSectorSize], 512 70 75 71 76 ; Return with success 72 77 xor ah, ah 73 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH74 75 .BufferTooSmall:76 mov ah, RET_HD_INVALID77 78 .ReturnWithError: 78 79 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
Note:
See TracChangeset
for help on using the changeset viewer.