Changeset 140 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS
- Timestamp:
- Mar 14, 2011, 11:38:26 AM (14 years ago)
- google:author:
- aitotat
- Location:
- trunk/XTIDE_Universal_BIOS/Src
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuEvent.asm
r137 r140 85 85 .ItemHighlightedFromCX: 86 86 push cx 87 push dx88 87 call RamVars_GetSegmentToDS 89 88 call DriveXlate_Reset 90 89 call BootMenu_GetDriveToDXforMenuitemInCX 91 90 call DriveXlate_SetDriveToSwap 92 pop ax ; Update previous item 91 92 xor ax, ax ; Update first floppy drive (for translated drive number) 93 93 CALL_MENU_LIBRARY RefreshItemFromAX 94 pop ax ; Update new item 94 mov dl, 80h 95 call BootMenu_GetMenuitemToDXforDriveInDL 96 xchg ax, dx ; Update first hard disk (for translated drive number) 97 CALL_MENU_LIBRARY RefreshItemFromAX 98 pop ax ; Update new item (for translated drive number) 95 99 CALL_MENU_LIBRARY RefreshItemFromAX 96 100 CALL_MENU_LIBRARY RefreshInformation -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Common/HStatus.asm
r120 r140 172 172 ALIGN JUMP_ALIGN 173 173 HStatus_PollBsyAndFlg: 174 call InitializeTimeoutWithTicksInCL; Initialize timeout counter175 in al, dx ; Discard contents for first read176 ; (should read Alternate Status Register)174 call HTimer_InitializeTimeoutWithTicksInCL ; Initialize timeout counter 175 in al, dx ; Discard contents for first read 176 ; (should read Alternate Status Register) 177 177 ALIGN JUMP_ALIGN 178 178 .PollLoop: 179 in al, dx ; Load IDE Status Register180 test al, FLG_IDE_ST_BSY ; Controller busy?181 jnz SHORT .UpdateTimeout ; If so, jump to timeout update182 test al, ah ; Test secondary flag183 jnz SHORT GetErrorCodeFromPollingToAH ; If set, break loop179 in al, dx ; Load IDE Status Register 180 test al, FLG_IDE_ST_BSY ; Controller busy? 181 jnz SHORT .UpdateTimeout ; If so, jump to timeout update 182 test al, ah ; Test secondary flag 183 jnz SHORT GetErrorCodeFromPollingToAH ; If set, break loop 184 184 ALIGN JUMP_ALIGN 185 185 .UpdateTimeout: 186 call SetCFifTimeout187 jnc SHORT .PollLoop ; Loop if time left (sets CF on timeout)186 call HTimer_SetCFifTimeout 187 jnc SHORT .PollLoop ; Loop if time left (sets CF on timeout) 188 188 jmp HError_ProcessTimeoutAfterPollingBSYandSomeOtherStatusBit 189 189 … … 206 206 ALIGN JUMP_ALIGN 207 207 HStatus_PollBsy: 208 call InitializeTimeoutWithTicksInCL; Initialize timeout counter209 in al, dx ; Discard contents for first read210 ; (should read Alternate Status Register)208 call HTimer_InitializeTimeoutWithTicksInCL ; Initialize timeout counter 209 in al, dx ; Discard contents for first read 210 ; (should read Alternate Status Register) 211 211 ALIGN JUMP_ALIGN 212 212 .PollLoop: 213 in al, dx ; Load IDE Status Reg214 test al, FLG_IDE_ST_BSY ; Controller busy?215 jz SHORT GetErrorCodeFromPollingToAH ; If not, jump to check errors216 call SetCFifTimeout; Update timeout counter217 jnc SHORT .PollLoop ; Loop if time left (sets CF on timeout)213 in al, dx ; Load IDE Status Reg 214 test al, FLG_IDE_ST_BSY ; Controller busy? 215 jz SHORT GetErrorCodeFromPollingToAH ; If not, jump to check errors 216 call HTimer_SetCFifTimeout ; Update timeout counter 217 jnc SHORT .PollLoop ; Loop if time left (sets CF on timeout) 218 218 ALIGN JUMP_ALIGN 219 219 GetErrorCodeFromPollingToAH: 220 220 jmp HError_ProcessErrorsAfterPollingBSY 221 222 223 ;--------------------------------------------------------------------224 ; InitializeTimeoutWithTicksInCL225 ; Parameters:226 ; CL: Timeout value in system timer ticks227 ; DS: Segment to RAMVARS228 ; Returns:229 ; Nothing230 ; Corrupts registers:231 ; CX232 ;--------------------------------------------------------------------233 ALIGN JUMP_ALIGN234 InitializeTimeoutWithTicksInCL:235 push bx236 xchg cx, ax237 238 xor ah, ah ; Timeout ticks now in AX239 mov bx, RAMVARS.wTimeoutCounter240 call TimerTicks_InitializeTimeoutFromAX241 242 xchg ax, cx ; Restore AX243 pop bx244 ret245 246 ;--------------------------------------------------------------------247 ; SetCFifTimeout248 ; Parameters:249 ; DS: Segment to RAMVARS250 ; Returns:251 ; CF: Set if timeout252 ; Cleared if time left253 ; Corrupts registers:254 ; CX255 ;--------------------------------------------------------------------256 ALIGN JUMP_ALIGN257 SetCFifTimeout:258 push bx259 xchg cx, ax260 261 mov bx, RAMVARS.wTimeoutCounter262 call TimerTicks_GetTimeoutTicksLeftToAXfromDSBX263 264 xchg ax, cx ; Restore AX265 pop bx266 ret -
trunk/XTIDE_Universal_BIOS/Src/Main.asm
r137 r140 135 135 %include "HDrvSel.asm" ; For selecting drive to access 136 136 %include "HCommand.asm" ; For outputting command and parameters 137 %include "HTimer.asm" ; For timeout and delay 137 138 138 139 ; Include .asm files (Interrupt handlers)
Note:
See TracChangeset
for help on using the changeset viewer.