Changeset 181 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIO.asm
- Timestamp:
- Nov 13, 2011, 3:38:40 PM (13 years ago)
- google:author:
- krille_n_@hotmail.com
- File:
-
- 1 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
Note:
See TracChangeset
for help on using the changeset viewer.