Changeset 267 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Device/MemoryMappedIDE
- Timestamp:
- Feb 24, 2012, 8:34:41 PM (13 years ago)
- google:author:
- aitotat@gmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Device/MemoryMappedIDE/MemIdeTransfer.asm
r266 r267 70 70 ;-------------------------------------------------------------------- 71 71 ReadFromSectorAccessWindow: 72 pop ds ; CS -> DS73 mov di, si 74 mov si, JRIDE_SECTOR_ACCESS_WINDOW_OFFSET 75 76 call WaitUntilReadyToTransferNextBlock 77 jc SHORT ReturnWithMemoryIOtransferErrorInAH 78 79 mov cx, [bp+ PIOVARS.wWordsInBlock]72 pop ds ; CS -> DS 73 mov di, si ; ES:DI = destination 74 mov si, JRIDE_SECTOR_ACCESS_WINDOW_OFFSET ; DS:SI = source 75 76 call WaitUntilReadyToTransferNextBlock 77 jc SHORT ReturnWithMemoryIOtransferErrorInAH 78 79 mov cx, [bp+MEMPIOVARS.wWordsInBlock] 80 80 81 81 ALIGN JUMP_ALIGN 82 82 .ReadNextBlockFromDrive: 83 cmp [bp+ PIOVARS.wWordsLeft], cx83 cmp [bp+MEMPIOVARS.wWordsLeft], cx 84 84 jbe SHORT .ReadLastBlockFromDrive 85 85 call ReadSingleBlockFromSectorAccessWindowInDSSItoESDI … … 88 88 89 89 ; Increment number of successfully read WORDs 90 mov cx, [bp+ PIOVARS.wWordsInBlock]91 sub [bp+ PIOVARS.wWordsLeft], cx92 add [bp+ PIOVARS.wWordsDone], cx90 mov cx, [bp+MEMPIOVARS.wWordsInBlock] 91 sub [bp+MEMPIOVARS.wWordsLeft], cx 92 add [bp+MEMPIOVARS.wWordsDone], cx 93 93 jmp SHORT .ReadNextBlockFromDrive 94 94 95 95 ALIGN JUMP_ALIGN 96 96 .ReadLastBlockFromDrive: 97 mov ch, [bp+ PIOVARS.wWordsLeft+1]; Sectors left97 mov ch, [bp+MEMPIOVARS.wWordsLeft+1] ; Sectors left 98 98 call ReadSingleBlockFromSectorAccessWindowInDSSItoESDI 99 99 … … 107 107 ReturnWithMemoryIOtransferErrorInAH: 108 108 lds di, [bp+MEMPIOVARS.fpDPT] ; DPT now in DS:DI 109 mov cx, [bp+ PIOVARS.wWordsDone]109 mov cx, [bp+MEMPIOVARS.wWordsDone] 110 110 jc SHORT .ConvertTransferredWordsInCXtoSectors 111 add cx, [bp+ PIOVARS.wWordsLeft]; Never sets CF111 add cx, [bp+MEMPIOVARS.wWordsLeft] ; Never sets CF 112 112 .ConvertTransferredWordsInCXtoSectors: 113 113 xchg cl, ch … … 141 141 jc SHORT ReturnWithMemoryIOtransferErrorInAH 142 142 143 mov cx, [bp+ PIOVARS.wWordsInBlock]143 mov cx, [bp+MEMPIOVARS.wWordsInBlock] 144 144 145 145 ALIGN JUMP_ALIGN 146 146 .WriteNextBlockToDrive: 147 cmp [bp+ PIOVARS.wWordsLeft], cx147 cmp [bp+MEMPIOVARS.wWordsLeft], cx 148 148 jbe SHORT .WriteLastBlockToDrive 149 149 call WriteSingleBlockFromDSSIToSectorAccessWindowInESDI … … 152 152 153 153 ; Increment number of successfully written WORDs 154 mov cx, [bp+ PIOVARS.wWordsInBlock]155 sub [bp+ PIOVARS.wWordsLeft], cx156 add [bp+ PIOVARS.wWordsDone], cx154 mov cx, [bp+MEMPIOVARS.wWordsInBlock] 155 sub [bp+MEMPIOVARS.wWordsLeft], cx 156 add [bp+MEMPIOVARS.wWordsDone], cx 157 157 jmp SHORT .WriteNextBlockToDrive 158 158 159 159 ALIGN JUMP_ALIGN 160 160 .WriteLastBlockToDrive: 161 mov ch, [bp+ PIOVARS.wWordsLeft+1] ; Sectors left161 mov ch, [bp+MEMPIOVARS.wWordsLeft+1] ; Sectors left 162 162 ePUSH_T bx, CheckErrorsAfterTransferringLastMemoryMappedBlock 163 163 ; Fall to WriteSingleBlockFromDSSIToSectorAccessWindowInESDI
Note:
See TracChangeset
for help on using the changeset viewer.