Changeset 294 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers
- Timestamp:
- Mar 4, 2012, 1:35:10 AM (13 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Handlers
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm
r277 r294 26 26 27 27 call RamVars_GetSegmentToDS 28 28 29 29 call DriveXlate_ToOrBack 30 30 mov [RAMVARS.xlateVars+XLATEVARS.bXlatedDrv], dl 31 31 32 32 call FindDPT_ForDriveNumberInDL ; DS:DI points to our DPT, or NULL if not our drive 33 33 jnc SHORT .OurFunction ; DPT found, this is one of our drives, and thus our function 34 34 35 cmp ah, 036 jz short.OurFunction ; we handle all function 0h requests (resets)35 test ah, ah 36 jz SHORT .OurFunction ; we handle all function 0h requests (resets) 37 37 cmp ah, 8 38 jn zSHORT Int13h_DirectCallToAnotherBios ; non-8h function, handled by foreign bios38 jne SHORT Int13h_DirectCallToAnotherBios ; non-8h function, handled by foreign bios 39 39 40 40 %ifndef MODULE_SERIAL_FLOPPY 41 ; With floppy support, we handle all traffic for function 08h, as we need to wrap both hard disk and 42 ; floppy drive counts. Without floppy support, we handle only hard disk traffic for function 08h, 41 ; With floppy support, we handle all traffic for function 08h, as we need to wrap both hard disk and 42 ; floppy drive counts. Without floppy support, we handle only hard disk traffic for function 08h, 43 43 ; and thus need the check below. 44 44 ; 45 test dl, dl 45 test dl, dl 46 46 jns SHORT Int13h_DirectCallToAnotherBios 47 %endif 48 49 .OurFunction: 47 %endif 48 49 .OurFunction: 50 50 ; Jump to correct BIOS function 51 51 eMOVZX bx, ah … … 141 141 test dl, dl 142 142 js short Int13h_UnsupportedFunction 143 mov ah, 0143 xor ah, ah 144 144 jmp short Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH 145 145 %endif … … 172 172 %ifdef MODULE_SERIAL_FLOPPY 173 173 mov al, [bp+IDEPACK.intpack+INTPACK.dl] 174 Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH_ALHasDriveNumber: 174 Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH_ALHasDriveNumber: 175 175 call Int13h_SetErrorCodeToBdaAndToIntpackInSSBPfromAH_ALHasDriveNumber 176 176 %else … … 191 191 ; Returns: 192 192 ; Depends on function 193 ; NOTE: ES:DI needs to be returned from the previous interrupt 193 ; NOTE: ES:DI needs to be returned from the previous interrupt 194 194 ; handler, for floppy DPT in function 08h 195 195 ; Corrupts registers: … … 251 251 .HardDisk: 252 252 LOAD_BDA_SEGMENT_TO ds, di 253 mov [bx], ah 253 mov [bx], ah 254 254 %else 255 255 Int13h_SetErrorCodeToBdaAndToIntpackInSSBPfromAH: 256 256 ; Store error code to BDA 257 LOAD_BDA_SEGMENT_TO ds, di 257 LOAD_BDA_SEGMENT_TO ds, di 258 258 mov [BDA.bHDLastSt], ah 259 259 %endif -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm
r282 r294 19 19 ; Returns with INTPACK: 20 20 ; AH: Int 13h return status (from drive requested in DL) 21 ; CF: 0 if succes full, 1 if error21 ; CF: 0 if successful, 1 if error 22 22 ;-------------------------------------------------------------------- 23 23 ALIGN JUMP_ALIGN … … 28 28 %ifdef MODULE_SERIAL_FLOPPY 29 29 ; 30 ; "Reset" emulat d serial floppy drives, if any. There is nothing to actually do for this reset,30 ; "Reset" emulated serial floppy drives, if any. There is nothing to actually do for this reset, 31 31 ; but record the proper error return code if one of these floppy drives is the drive requested. 32 32 ; … … 39 39 40 40 adc dl, al ; second drive (CF set) if present 41 ; If no drive is present, this will result in ffh which 41 ; If no drive is present, this will result in ffh which 42 42 ; won't match a drive 43 43 call BackupErrorCodeFromTheRequestedDriveToBH … … 48 48 test bl, bl ; If we were called with a floppy disk, then we are done, 49 49 jns SHORT .SkipHardDiskReset ; don't do hard disks. 50 50 51 51 call ResetForeignHardDisks 52 52 53 ; Resetting our hard disks will modify dl and bl to be idevars offset based instead of drive number based, 53 ; Resetting our hard disks will modify dl and bl to be idevars offset based instead of drive number based, 54 54 ; such that this call must be the last in the list of reset routines called. 55 55 ; … … 57 57 ; and we need to override that value if we are xlate'd into 80h with one of our drives. 58 58 ; 59 call ResetHardDisksHandledByOurBIOS 59 call ResetHardDisksHandledByOurBIOS 60 60 61 61 .SkipHardDiskReset: … … 139 139 ; Parameters: 140 140 ; DS:DI: Ptr to DPT for requested drive 141 ; If DPT pointer is not available, or error result in BH won't be used anyway, 141 ; If DPT pointer is not available, or error result in BH won't be used anyway, 142 142 ; enter through .ErrorCodeNotUsed. 143 143 ; SS:BP: Ptr to IDEPACK … … 148 148 ;-------------------------------------------------------------------- 149 149 ResetHardDisksHandledByOurBIOS: 150 mov bl, 0; Assume Null IdevarsOffset for now, assuming foreign drive150 xor bl, bl ; Assume Null IdevarsOffset for now, assuming foreign drive 151 151 test di, di 152 152 jz .ErrorCodeNotUsed 153 153 mov bl, [di+DPT.bIdevarsOffset] ; replace drive number with Idevars pointer for cmp with dl 154 155 .ErrorCodeNotUsed: ; BH will be garbage on exit if thi e entry point is used,154 155 .ErrorCodeNotUsed: ; BH will be garbage on exit if this entry point is used, 156 156 ; but reset of all drives will still happen 157 157 -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH10h_HReady.asm
r150 r294 15 15 ; Returns with INTPACK: 16 16 ; AH: Int 13h return status 17 ; CF: 0 if succes full, 1 if error17 ; CF: 0 if successful, 1 if error 18 18 ;-------------------------------------------------------------------- 19 19 ALIGN JUMP_ALIGN -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH11h_HRecal.asm
r162 r294 15 15 ; Returns with INTPACK: 16 16 ; AH: BIOS Error code 17 ; CF: 0 if succes full, 1 if error17 ; CF: 0 if successful, 1 if error 18 18 ;-------------------------------------------------------------------- 19 19 ALIGN JUMP_ALIGN … … 35 35 ; Returns: 36 36 ; AH: BIOS Error code 37 ; CF: 0 if succes full, 1 if error37 ; CF: 0 if successful, 1 if error 38 38 ; Corrupts registers: 39 39 ; AL, BX, CX, DX -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH15h_HSize.asm
r285 r294 14 14 ; SS:BP: Ptr to IDEPACK 15 15 ; Returns with INTPACK: 16 ; If succes full:16 ; If successful: 17 17 ; AH: Hard Disk: 3 (Hard disk accessible) 18 18 ; Floppy: 1 (Floppy disk, without change detection) … … 28 28 %ifdef MODULE_SERIAL_FLOPPY 29 29 mov cl, 1 ; 1 = floppy disk, no change detection 30 31 test dl,dl ; DO NOT store the sector count if this is a 32 jns .FloppyDrive ; floppy disk, some OS's depend on this not 30 31 test dl,dl ; DO NOT store the sector count if this is a 32 jns .FloppyDrive ; floppy disk, some OS's depend on this not 33 33 ; happening for floppies in order to boot. 34 34 %endif 35 35 36 36 call AH15h_GetSectorCountToBXDXAX 37 37 mov [bp+IDEPACK.intpack+INTPACK.cx], dx ; HIWORD to CX 38 38 xchg [bp+IDEPACK.intpack+INTPACK.dx], ax ; LOWORD to DX, AL gets drive number 39 39 40 xor ah, ah 41 %ifdef MODULE_SERIAL_FLOPPY 40 xor ah, ah 41 %ifdef MODULE_SERIAL_FLOPPY 42 42 mov cl, 3 ; 3 = Hard Disk Accessible 43 43 .FloppyDrive: 44 45 call Int13h_SetErrorCodeToBdaAndToIntpackInSSBPfromAH_ALHasDriveNumber ; Store success to BDA and CF 46 mov BYTE[bp+IDEPACK.intpack+INTPACK.ah], cl44 45 call Int13h_SetErrorCodeToBdaAndToIntpackInSSBPfromAH_ALHasDriveNumber ; Store success to BDA and CF 46 mov [bp+IDEPACK.intpack+INTPACK.ah], cl 47 47 %else 48 call Int13h_SetErrorCodeToBdaAndToIntpackInSSBPfromAH ; Store success to BDA and CF 48 call Int13h_SetErrorCodeToBdaAndToIntpackInSSBPfromAH ; Store success to BDA and CF 49 49 mov BYTE [bp+IDEPACK.intpack+INTPACK.ah], 3 50 %endif 51 50 %endif 51 52 52 jmp Int13h_ReturnFromHandlerWithoutStoringErrorCode 53 53 -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH1h_HStatus.asm
r258 r294 23 23 %ifdef MODULE_SERIAL_FLOPPY 24 24 test dl, dl 25 j ns .HardDisk26 mov ah, [BDA.bFDRetST] 25 js .HardDisk 26 mov ah, [BDA.bFDRetST] ; Unlike for hard disks below, floppy version does not clear the status 27 27 jmp .done 28 .HardDisk: 28 .HardDisk: 29 29 %endif 30 31 xchg ah, [BDA.bHDLastSt] ; Load and clear last error 32 ; Note that AH is cleared with the LOAD_BDA_SEGMENT above 33 30 31 xchg ah, [BDA.bHDLastSt] ; Load and clear last error (AH is cleared with the LOAD_BDA_SEGMENT_TO above) 32 34 33 .done: 34 %ifndef USE_186 35 35 call Int13h_SetErrorCodeToIntpackInSSBPfromAH 36 36 jmp Int13h_ReturnFromHandlerWithoutStoringErrorCode 37 %else 38 push Int13h_ReturnFromHandlerWithoutStoringErrorCode 39 jmp Int13h_SetErrorCodeToIntpackInSSBPfromAH 40 %endif -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH23h_HFeatures.asm
r170 r294 24 24 ; Returns with INTPACK: 25 25 ; AH: Int 13h return status 26 ; CF: 0 if succes full, 1 if error26 ; CF: 0 if successful, 1 if error 27 27 ;-------------------------------------------------------------------- 28 28 ALIGN JUMP_ALIGN … … 51 51 ; Returns: 52 52 ; AH: Int 13h return status 53 ; CF: 0 if succes full, 1 if error53 ; CF: 0 if successful, 1 if error 54 54 ; Corrupts registers: 55 55 ; AL, BX, CX, DX -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH24h_HSetBlocks.asm
r232 r294 18 18 ; Returns with INTPACK: 19 19 ; AH: Int 13h return status 20 ; CF: 0 if succes full, 1 if error20 ; CF: 0 if successful, 1 if error 21 21 ;-------------------------------------------------------------------- 22 22 AH24h_HandlerForSetMultipleBlocks: … … 38 38 ; Returns: 39 39 ; AH: Int 13h return status 40 ; CF: 0 if succes full, 1 if error40 ; CF: 0 if successful, 1 if error 41 41 ; Corrupts registers: 42 42 ; AL, BX, CX, DX -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH25h_HDrvID.asm
r221 r294 18 18 ; Returns with INTPACK: 19 19 ; AH: Int 13h return status 20 ; CF: 0 if succes full, 1 if error20 ; CF: 0 if successful, 1 if error 21 21 ;-------------------------------------------------------------------- 22 22 ALIGN JUMP_ALIGN … … 40 40 ; Returns with INTPACK: 41 41 ; AH: Int 13h return status 42 ; CF: 0 if succes full, 1 if error42 ; CF: 0 if successful, 1 if error 43 43 ; Corrupts registers: 44 44 ; AL, BX, CX, DX … … 53 53 call AccessDPT_GetDriveSelectByteToAL 54 54 mov bh, al 55 eMOVZX ax, BYTE[di+DPT.bIdevarsOffset]55 eMOVZX ax, [di+DPT.bIdevarsOffset] 56 56 xchg bp, ax 57 57 call Device_IdentifyToBufferInESSIwithDriveSelectByteInBH -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH2h_HRead.asm
r258 r294 20 20 ; Bits 5...0: Starting sector number (1...63) 21 21 ; DH: Starting head number (0...255) 22 ; ES:BX: Pointer to buffer rec ieving data22 ; ES:BX: Pointer to buffer receiving data 23 23 ; Returns with INTPACK: 24 24 ; AH: Int 13h/40h floppy return status 25 25 ; AL: Burst error length if AH returns 11h (we never return error code 11h) 26 26 ; Number of sectors actually read (only valid if CF set for someBIOSes) 27 ; CF: 0 if successful l, 1 if error27 ; CF: 0 if successful, 1 if error 28 28 ;-------------------------------------------------------------------- 29 29 ALIGN JUMP_ALIGN -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH3h_HWrite.asm
r249 r294 24 24 ; AH: Int 13h/40h floppy return status 25 25 ; AL: Number of sectors actually written (only valid if CF set for someBIOSes) 26 ; CF: 0 if successful l, 1 if error26 ; CF: 0 if successful, 1 if error 27 27 ;-------------------------------------------------------------------- 28 28 ALIGN JUMP_ALIGN -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH4h_HVerify.asm
r249 r294 23 23 ; AH: Int 13h/40h floppy return status 24 24 ; AL: Number of sectors actually verified (only valid if CF set for someBIOSes) 25 ; CF: 0 if successful l, 1 if error25 ; CF: 0 if successful, 1 if error 26 26 ;-------------------------------------------------------------------- 27 27 ALIGN JUMP_ALIGN -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH8h_HParams.asm
r285 r294 22 22 ; ES:DI: Floppy DPT (for floppies only) 23 23 ; AH: Int 13h/40h floppy return status 24 ; CF: 0 if successful l, 1 if error24 ; CF: 0 if successful, 1 if error 25 25 ;-------------------------------------------------------------------- 26 26 AH8h_HandlerForReadDiskDriveParameters: … … 31 31 jnc SHORT .MidGame 32 32 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH 33 34 .OurDrive: 33 34 .OurDrive: 35 35 call AH8h_GetDriveParameters 36 36 … … 41 41 %endif 42 42 ;; fall-through 43 44 .MidGame: 43 44 .MidGame: 45 45 call RamVars_GetCountOfKnownDrivesToAX ; assume hard disk for now, will discard if for floppies 46 46 47 47 test byte [bp+IDEPACK.intpack+INTPACK.dl], 080h 48 48 jnz .Done 49 49 50 50 mov [bp+IDEPACK.intpack+INTPACK.bl], bl 51 51 52 52 mov [bp+IDEPACK.intpack+INTPACK.es], es 53 mov [bp+IDEPACK.intpack+INTPACK.di], di 53 mov [bp+IDEPACK.intpack+INTPACK.di], di 54 54 55 55 call FloppyDrive_GetCountToAX 56 56 57 .Done: 57 .Done: 58 58 mov ah, dh 59 59 60 60 mov [bp+IDEPACK.intpack+INTPACK.cx], cx 61 61 xchg [bp+IDEPACK.intpack+INTPACK.dx], ax ; recover DL for BDA last status byte determination … … 63 63 xor ah, ah 64 64 %ifdef MODULE_SERIAL_FLOPPY 65 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH_ALHasDriveNumber 65 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH_ALHasDriveNumber 66 66 %else 67 67 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH … … 118 118 eSHR_IM bl,FLGH_DPT_SERIAL_FLOPPY_TYPE_FIELD_POSITION 119 119 %endif 120 %endif 120 %endif 121 121 ret 122 122 … … 127 127 ; So we return fixed values out of the ROM for callers who might be expecting this information. 128 128 ; 129 ; On AT systems, we return the information for a 1.44 MB disk, 129 ; On AT systems, we return the information for a 1.44 MB disk, 130 130 ; and on XT systems, we return the information for a 360 KB disk. 131 131 ; … … 138 138 139 139 db 1h << 1 | 0 ; Offset 1: Typical values of 1 for head load time 140 ; DMA used (although it actually is not, but is more restr ctive)141 db 25h ; Offset 2: Inactivi y motor turn-off delay,140 ; DMA used (although it actually is not, but is more restrictive) 141 db 25h ; Offset 2: Inactivity motor turn-off delay, 142 142 ; Typical value of 25h for 2 second delay 143 143 db 02h ; Offset 3: Sector size, always 512 … … 161 161 db 0f6h ; Offset 8: Fill byte for format 162 162 db 0fh ; Offset 9: Head setting time 163 db 08h ; Offset A: Wait for motor start putime163 db 08h ; Offset A: Wait for motor startup time 164 164 165 165 %ifdef USE_AT -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm
r279 r294 15 15 ; Returns with INTPACK: 16 16 ; AH: Int 13h return status 17 ; CF: 0 if succes full, 1 if error17 ; CF: 0 if successful, 1 if error 18 18 ;-------------------------------------------------------------------- 19 19 AH9h_HandlerForInitializeDriveParameters: … … 36 36 ; Returns: 37 37 ; AH: Int 13h return status 38 ; CF: 0 if succes full, 1 if error38 ; CF: 0 if successful, 1 if error 39 39 ; Corrupts registers: 40 40 ; AL, BX, DX … … 45 45 46 46 %ifdef MODULE_SERIAL 47 ; 48 ; no need to do this for serial dev eices, and we use the DPT_RESET flag bits47 ; 48 ; no need to do this for serial devices, and we use the DPT_RESET flag bits 49 49 ; to store the drive type for serial floppy drives (MODULE_SERIAL_FLOPPY) 50 50 ; 51 51 xor ah, ah 52 52 test byte [di+DPT.bFlagsHigh], FLGH_DPT_SERIAL_DEVICE ; Clears CF 53 jnz .ReturnNotSuccessful l53 jnz .ReturnNotSuccessful 54 54 %endif 55 55 56 56 ; Try to select drive and wait until ready 57 57 or BYTE [di+DPT.bFlagsHigh], MASKH_DPT_RESET ; Everything uninitialized … … 59 59 mov [bp+IDEPACK.bDrvAndHead], al 60 60 call Device_SelectDrive 61 jc SHORT .ReturnNotSuccessful l61 jc SHORT .ReturnNotSuccessful 62 62 and BYTE [di+DPT.bFlagsHigh], ~FLGH_DPT_RESET_nDRDY ; Clear since success 63 63 … … 80 80 .InitializeBlockMode: 81 81 call InitializeBlockMode 82 jc SHORT .ReturnNotSuccessful l82 jc SHORT .ReturnNotSuccessful 83 83 and BYTE [di+DPT.bFlagsHigh], ~FLGH_DPT_RESET_nSETBLOCK ; Keeps CF clear 84 84 85 .ReturnNotSuccessful l:85 .ReturnNotSuccessful: 86 86 pop cx 87 87 pop si … … 96 96 ; Returns: 97 97 ; AH: BIOS Error code 98 ; CF: Cleared if succes full98 ; CF: Cleared if successful 99 99 ; Set if any error 100 100 ; Corrupts registers: … … 121 121 ; Returns: 122 122 ; AH: BIOS Error code 123 ; CF: Cleared if succes full123 ; CF: Cleared if successful 124 124 ; Set if any error 125 125 ; Corrupts registers: … … 146 146 ; Returns: 147 147 ; AH: BIOS Error code 148 ; CF: Cleared if succes full148 ; CF: Cleared if successful 149 149 ; Set if any error 150 150 ; Corrupts registers: -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHCh_HSeek.asm
r162 r294 21 21 ; Returns with INTPACK: 22 22 ; AH: BIOS Error code 23 ; CF: 0 if succes full, 1 if error23 ; CF: 0 if successful, 1 if error 24 24 ;-------------------------------------------------------------------- 25 25 ALIGN JUMP_ALIGN … … 44 44 ; Returns: 45 45 ; AH: BIOS Error code 46 ; CF: 0 if succes full, 1 if error46 ; CF: 0 if successful, 1 if error 47 47 ; Corrupts registers: 48 48 ; AL, BX, CX, DX -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHDh_HReset.asm
r282 r294 15 15 ; Returns with INTPACK: 16 16 ; AH: Int 13h return status 17 ; CF: 0 if succes full, 1 if error17 ; CF: 0 if successful, 1 if error 18 18 ;-------------------------------------------------------------------- 19 19 ALIGN JUMP_ALIGN … … 37 37 ; Returns: 38 38 ; AH: Int 13h return status 39 ; CF: 0 if succes full, 1 if error39 ; CF: 0 if successful, 1 if error 40 40 ; Corrupts registers: 41 41 ; AL, SI … … 53 53 54 54 ; Initialize Master and Slave drives 55 mov al, [di+DPT.bIdevarsOffset] ;pointer to controller we are looking to reset56 mov ah, 0 ;initialize error code, assume success57 55 eMOVZX ax, [di+DPT.bIdevarsOffset] ; (AL) pointer to controller we are looking to reset 56 ; (AH) initialize error code, assume success 57 58 58 mov si, IterateAndResetDrives 59 59 call FindDPT_IterateAllDPTs … … 70 70 ; IterateAndResetDrives: Iteration routine for use with IterateAllDPTs. 71 71 ; 72 ; When a drive on the controller is found, it is reset, and the error code 72 ; When a drive on the controller is found, it is reset, and the error code 73 73 ; merged into overall error code for this controller. Master will be reset 74 74 ; first. Note that the iteration will go until the end of the DPT list. … … 79 79 push ax 80 80 call AH9h_InitializeDriveForUse ; Reset Master and Slave (Master will come first in DPT list) 81 pop ax 81 pop ax 82 82 jnc .done 83 83 or ah, (RET_HD_RESETFAIL << 1) | 1 ; OR in Reset Failed error code and CF, will SHR into position later -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH41h_CheckIfExtensionsPresent.asm
r167 r294 19 19 ; BX: AA55h 20 20 ; CX: Support bits 21 ; CF: 0 if succes full, 1 if error21 ; CF: 0 if successful, 1 if error 22 22 ;-------------------------------------------------------------------- 23 23 ALIGN JUMP_ALIGN -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH42h_ExtendedReadSectors.asm
r249 r294 18 18 ; Returns with INTPACK: 19 19 ; AH: Int 13h return status 20 ; CF: 0 if succes full, 1 if error20 ; CF: 0 if successful, 1 if error 21 21 ; Return with Disk Address Packet in INTPACK: 22 22 ; .wSectorCount Number of sectors read successfully -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH43h_ExtendedWriteSectors.asm
r249 r294 20 20 ; Returns with INTPACK: 21 21 ; AH: Int 13h return status 22 ; CF: 0 if succes full, 1 if error22 ; CF: 0 if successful, 1 if error 23 23 ; Return with Disk Address Packet in INTPACK: 24 24 ; .wSectorCount Number of sectors written successfully -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH44h_ExtendedVerifySectors.asm
r249 r294 18 18 ; Returns with INTPACK: 19 19 ; AH: Int 13h return status 20 ; CF: 0 if succes full, 1 if error20 ; CF: 0 if successful, 1 if error 21 21 ; Return with Disk Address Packet in INTPACK: 22 22 ; .wSectorCount Number of sectors verified successfully -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH47h_ExtendedSeek.asm
r249 r294 18 18 ; Returns with INTPACK: 19 19 ; AH: Int 13h return status 20 ; CF: 0 if succes full, 1 if error20 ; CF: 0 if successful, 1 if error 21 21 ;-------------------------------------------------------------------- 22 22 ALIGN JUMP_ALIGN -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH48h_GetExtendedDriveParameters.asm
r230 r294 19 19 ; AH: Int 13h return status 20 20 ; DS:SI: Ptr to Extended Drive Information Table 21 ; CF: 0 if succes full, 1 if error21 ; CF: 0 if successful, 1 if error 22 22 ;-------------------------------------------------------------------- 23 23 AH48h_HandlerForGetExtendedDriveParameters: -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Address.asm
r230 r294 128 128 ConvertLCHStoLBARegisterValues: 129 129 ; cylToSeek*headsPerCyl (18-bit result) 130 mov ax, cx ; Copy Cylinder number to AX 131 ; We could save a byte here by using CWD instead of the XOR DH, DH in eMOVZX 132 ; but I'm not sure how that would affect speed. 130 mov ax, LBA_ASSIST_SPT ; Load Sectors per Track 131 xchg cx, ax ; Cylinder number to AX, Sectors per Track to CX 133 132 134 eMOVZX dx, BYTE [di+DPT.bLbaHeads] 133 %ifdef USE_386 134 movzx dx, [di+DPT.bLbaHeads] 135 %else 136 cwd 137 mov dl, [di+DPT.bLbaHeads] 138 %endif 135 139 mul dx ; DX:AX = cylToSeek*headsPerCyl 136 140 … … 141 145 142 146 ; *=sectPerTrack (18-bit by 6-bit multiplication with 24-bit result) 143 mov cx, LBA_ASSIST_SPT ; Load Sectors per Track144 147 xchg ax, dx ; Hiword to AX, loword to DX 145 148 mul cl ; AX = hiword * Sectors per Track -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Prepare.asm
r221 r294 34 34 cmp ax, BYTE 127 35 35 ja SHORT InvalidNumberOfSectorsRequested 36 ; Fall to GetEbiosCommandIndexToBX37 36 38 ;-------------------------------------------------------------------- 39 ; GetEbiosCommandIndexToBX 40 ; Parameters: 41 ; DS:DI: Ptr to DPT 42 ; ES:SI: Ptr to DAP (Disk Address Packet) 43 ; Returns: 44 ; BX: Index to command lookup table 45 ; Corrupts registers: 46 ; AX, DX 47 ;-------------------------------------------------------------------- 48 GetEbiosCommandIndexToBX: 37 ; Get EBIOS command index to BX 49 38 ; LBA28 or LBA48 command 50 xor dx, dx39 cwd 51 40 mov al, [es:si+DAP.qwLBA+3] ; Load LBA48 byte 3 (bits 24...31) 52 and a x, 00F0h ; Clear LBA28 bits 24...2741 and al, 0F0h ; Clear LBA28 bits 24...27 53 42 or ax, [es:si+DAP.qwLBA+4] ; Set bits from LBA bytes 4 and 5 54 43 cmp dx, ax ; Set CF if any of bits 28...47 set
Note:
See TracChangeset
for help on using the changeset viewer.