Changeset 116 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers
- Timestamp:
- Feb 26, 2011, 11:55:06 PM (14 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH1h_HStatus.asm
r35 r116 1 ; File name : AH1h_HStatus.asm 2 ; Project name : IDE BIOS 3 ; Created date : 27.9.2007 4 ; Last update : 24.8.2010 5 ; Author : Tomi Tilli 1 ; Project name : XTIDE Universal BIOS 6 2 ; Description : Int 13h function AH=1h, Read Disk Status. 7 3 … … 30 26 31 27 LOAD_BDA_SEGMENT_TO ds, di 32 xor ah, ah ; Zero AH33 cmp ah, [BDA.bHDLastSt] ; Set CF if error code is non-zero34 28 mov ah, [BDA.bHDLastSt] ; Last error to AH 29 cmp ah, 1 ; Set CF if error code is zero 30 cmc ; Invert CF 35 31 36 32 pop ds -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH25h_HDrvID.asm
r88 r116 108 108 ;-------------------------------------------------------------------- 109 109 ; Returns timeout value for drive detection. 110 ; Long timeout is required for detec ing first drive to make sure it is110 ; Long timeout is required for detecting first drive to make sure it is 111 111 ; ready after power-on (ATA specification says up to 31 seconds). 112 112 ; Short timeout is used for additional drives to prevent long boot time … … 123 123 ALIGN JUMP_ALIGN 124 124 AH25h_GetDriveDetectionTimeoutValue: 125 mov cl, B_TIMEOUT_RESET ; Load long timeout (assume first drive) 125 126 cmp BYTE [RAMVARS.bDrvCnt], 0 ; Detecting first drive? 126 je SHORT . GetLongDelayForInitialDetection127 je SHORT .Return 127 128 mov cl, B_TIMEOUT_DRVINFO ; Load short timeout 129 ALIGN JUMP_ALIGN, ret ; This speed optimization may be unnecessary 130 .Return: 128 131 ret 129 ALIGN JUMP_ALIGN130 .GetLongDelayForInitialDetection:131 mov cl, B_TIMEOUT_RESET ; Load long timeout132 ret -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHCh_HSeek.asm
r84 r116 1 ; File name : AHCh_HSeek.asm 2 ; Project name : IDE BIOS 3 ; Created date : 13.12.2007 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=Ch, Seek. 8 3 -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHDh_HReset.asm
r88 r116 100 100 ; HSR2: Check_status 101 101 mov cl, B_TIMEOUT_RESET ; Reset timeout delay 102 mov dx, [RAMVARS.wIdeBase] ; Load base port address 103 jmp HStatus_WaitBsyBase 102 jmp HStatus_WaitBsy 104 103 105 104 … … 125 124 call AH9h_InitializeDriveForUse 126 125 mov cl, ah ; Copy error code to CL 127 ALIGN JUMP_ALIGN128 126 .InitializeSlave: 129 127 pop dx ; Restore base port address … … 132 130 call AH9h_InitializeDriveForUse 133 131 mov ch, ah ; Copy error code to CH 134 ALIGN JUMP_ALIGN135 132 .CombineErrors: 136 133 or cl, ch ; OR error codes, clear CF 137 jnz SHORT .ReturnError 138 ret 139 .ReturnError: 134 jz SHORT .Return 140 135 mov ah, RET_HD_RESETFAIL ; Load Reset Failed error code 141 136 stc 137 .Return: 142 138 ret -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Common/HIRQ.asm
r86 r116 1 ; Project name : IDEBIOS1 ; Project name : XTIDE Universal BIOS 2 2 ; Description : Interrupt handling related functions. 3 3 … … 35 35 push ds 36 36 37 LOAD_BDA_SEGMENT_TO ds, ax 37 LOAD_BDA_SEGMENT_TO ds, ax, ! ; Zero AX 38 38 cli ; Disable interrupts 39 39 cmp al, [BDA.bHDTaskFlg] ; Task flag already set? … … 68 68 HIRQ_ClearTaskFlag: 69 69 push ds 70 LOAD_BDA_SEGMENT_TO ds, ax ; Also zero AX70 LOAD_BDA_SEGMENT_TO ds, ax, ! ; Also zero AX 71 71 mov [BDA.bHDTaskFlg], al 72 72 pop ds -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Common/HPIO.asm
r86 r116 1 ; Project name : IDEBIOS1 ; Project name : XTIDE Universal BIOS 2 2 ; Description : PIO transfer functions. 3 3 … … 15 15 16 16 ;-------------------------------------------------------------------- 17 ; Normalizes far pointer to that offset overflows won't happen18 ; when transferring data using PIO.19 ;20 ; HPIO_NORMALIZE_PTR21 ; Parameters:22 ; %1:%2: Far pointer to normalize23 ; %3: Scratch register24 ; %4: Scratch register25 ; Returns:26 ; %1:%2: Normalized far pointer27 ; Corrupts registers:28 ; %3, %429 ;--------------------------------------------------------------------30 %macro HPIO_NORMALIZE_PTR 431 mov %4, %2 ; Copy offset to scratch reg32 and %2, BYTE 0Fh ; Clear offset bits 15...433 eSHR_IM %4, 4 ; Divide offset by 1634 mov %3, %1 ; Copy segment to scratch reg35 add %3, %4 ; Add shifted offset to segment36 mov %1, %3 ; Set normalized segment37 %endmacro38 39 40 ;--------------------------------------------------------------------41 17 ; Reads sectors from hard disk using PIO transfer mode. 42 18 ; … … 110 86 mov [bp+PIOVARS.fnXfer], bx ; Store offset to transfer function 111 87 xchg bx, ax 112 ; Fall to HPIO_NormalizePtr 113 114 ;-------------------------------------------------------------------- 115 ; Initializes PIOVARS members. 116 ; 117 ; HPIO_InitializePIOVARS 88 ; Fall to HPIO_NormalizeDataPointer 89 90 ;-------------------------------------------------------------------- 91 ; Normalizes far pointers so that offset overflows won't happen 92 ; when transferring data using PIO. 93 ; 94 ; HPIO_NormalizeDataPointer 118 95 ; Parameters: 119 96 ; ES:BX: Ptr to source or destination data buffer … … 125 102 ;ALIGN JUMP_ALIGN 126 103 HPIO_NormalizeDataPointer: 127 HPIO_NORMALIZE_PTRes, bx, ax, cx104 NORMALIZE_FAR_POINTER es, bx, ax, cx 128 105 ret 129 106
Note:
See TracChangeset
for help on using the changeset viewer.