Changeset 181 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Device/IDE
- Timestamp:
- Nov 13, 2011, 3:38:40 PM (13 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Device/IDE
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIO.asm
r160 r181 7 7 ;-------------------------------------------------------------------- 8 8 ; IdeIO_OutputALtoIdeRegisterInDL 9 ; IdeIO_OutputALtoIdeControlBlockRegisterInDL 9 10 ; Parameters: 10 11 ; AL: Byte to output 11 ; DL: IDE Register 12 ; DL: IDE Register (IdeIO_OutputALtoIdeRegisterInDL) 13 ; IDE Control Block Register (IdeIO_OutputALtoIdeControlBlockRegisterInDL) 12 14 ; DS:DI: Ptr to DPT (in RAMVARS segment) 13 15 ; Returns: … … 18 20 ALIGN JUMP_ALIGN 19 21 IdeIO_OutputALtoIdeRegisterInDL: 20 mov bx, IDEVARS.wPort 21 call GetPortToDXandTranslateA0andA3ifNecessary 22 out dx, al 23 ret 22 mov bl, IDEVARS.wPort 23 SKIP2B f ; cmp ax, <next instruction> 24 ; Fall to IdeIO_OutputALtoIdeControlBlockRegisterInDL 24 25 25 26 ;--------------------------------------------------------------------27 ; IdeIO_OutputALtoIdeControlBlockRegisterInDL28 ; Parameters:29 ; AL: Byte to output30 ; DL: IDE Control Block Register31 ; DS:DI: Ptr to DPT (in RAMVARS segment)32 ; Returns:33 ; Nothing34 ; Corrupts registers:35 ; BX, DX36 ;--------------------------------------------------------------------37 ALIGN JUMP_ALIGN38 26 IdeIO_OutputALtoIdeControlBlockRegisterInDL: 39 mov b x, IDEVARS.wPortCtrl27 mov bl, IDEVARS.wPortCtrl 40 28 call GetPortToDXandTranslateA0andA3ifNecessary 41 29 out dx, al … … 55 43 ALIGN JUMP_ALIGN 56 44 IdeIO_InputToALfromIdeRegisterInDL: 57 mov b x, IDEVARS.wPort45 mov bl, IDEVARS.wPort 58 46 call GetPortToDXandTranslateA0andA3ifNecessary 59 47 in al, dx … … 64 52 ; GetPortToDXandTranslateA0andA3ifNecessary 65 53 ; Parameters: 66 ; B X: Offset to port in IDEVARS (IDEVARS.wPort or IDEVARS.wPortCtrl)54 ; BL: Offset to port in IDEVARS (IDEVARS.wPort or IDEVARS.wPortCtrl) 67 55 ; DL: IDE Register 68 56 ; DS:DI: Ptr to DPT (in RAMVARS segment) … … 74 62 ALIGN JUMP_ALIGN 75 63 GetPortToDXandTranslateA0andA3ifNecessary: 64 xor bh, bh 76 65 xor dh, dh ; DX now has IDE register offset 77 66 add bl, [di+DPT.bIdevarsOffset] ; CS:BX now points port address -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm
r171 r181 230 230 ALIGN JUMP_ALIGN 231 231 DualByteReadForXtide: 232 %ifdef USE_186 233 shr cx, 2 ; Smaller but slower on 186/286 234 %else 235 times 2 shr cx, 1 ; Loop unrolling 236 %endif 232 eSHR_IM cx, 2 ; Loop unrolling 237 233 mov bx, 8 ; Bit mask for toggling data low/high reg 238 234 ALIGN JUMP_ALIGN … … 322 318 push ds 323 319 push bx 324 %ifdef USE_186 325 shr cx, 2 ; Smaller but slower on 186/286 326 %else 327 times 2 shr cx, 1 ; Loop unrolling 328 %endif 320 eSHR_IM cx, 2 ; Loop unrolling 329 321 mov bx, 8 ; Bit mask for toggling data low/high reg 330 322 push es ; Copy ES... … … 372 364 WordWriteForXTIDEmod: 373 365 push ds 374 %ifdef USE_186 375 shr cx, 2 ; Smaller but slower on 186/286 376 %else 377 times 2 shr cx, 1 ; Loop unrolling 378 %endif 366 eSHR_IM cx, 2 ; Loop unrolling 379 367 push es ; Copy ES... 380 368 pop ds ; ...to DS
Note:
See TracChangeset
for help on using the changeset viewer.