Changeset 601 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Device/IDE/JrIdeTransfer.asm
- Timestamp:
- Feb 14, 2019, 7:38:08 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/JrIdeTransfer.asm
r592 r601 100 100 jc SHORT ReturnWithMemoryIOtransferErrorInAH 101 101 102 mov cx, [bp+MEMPIOVARS.wSectorsInBlock] ; Clears CH103 cmp [bp+MEMPIOVARS.bSectorsLeft], cl102 mov dx, [bp+MEMPIOVARS.wSectorsInBlock] ; Clears DH 103 cmp [bp+MEMPIOVARS.bSectorsLeft], dl 104 104 jbe SHORT .ReadLastBlockFromDrive 105 105 … … 119 119 ; transferred, there will be a wait for next block but DRQ is never 120 120 ; set since all is transferred! Then we get timeout error. 121 mov cx, [bp+MEMPIOVARS.wSectorsInBlock]122 sub [bp+MEMPIOVARS.bSectorsLeft], cl123 add [bp+MEMPIOVARS.bSectorsDone], cl124 cmp [bp+MEMPIOVARS.bSectorsLeft], cl121 mov dx, [bp+MEMPIOVARS.wSectorsInBlock] 122 sub [bp+MEMPIOVARS.bSectorsLeft], dl 123 add [bp+MEMPIOVARS.bSectorsDone], dl 124 cmp [bp+MEMPIOVARS.bSectorsLeft], dl 125 125 ja SHORT .ReadNextBlockFromDrive 126 126 127 127 ALIGN JUMP_ALIGN 128 128 .ReadLastBlockFromDrive: 129 mov cl, [bp+MEMPIOVARS.bSectorsLeft]130 push cx129 mov dl, [bp+MEMPIOVARS.bSectorsLeft] 130 push dx 131 131 call ReadSingleBlockFromSectorAccessWindowInDSSItoESDI 132 132 … … 181 181 jc SHORT ReturnWithMemoryIOtransferErrorInAH 182 182 183 mov cx, [bp+MEMPIOVARS.wSectorsInBlock]184 cmp [bp+MEMPIOVARS.bSectorsLeft], cl183 mov dx, [bp+MEMPIOVARS.wSectorsInBlock] 184 cmp [bp+MEMPIOVARS.bSectorsLeft], dl 185 185 jbe SHORT .WriteLastBlockToDrive 186 186 … … 192 192 193 193 ; Increment number of successfully written WORDs 194 mov cx, [bp+MEMPIOVARS.wSectorsInBlock]195 sub [bp+MEMPIOVARS.bSectorsLeft], cl196 add [bp+MEMPIOVARS.bSectorsDone], cl197 cmp [bp+MEMPIOVARS.bSectorsLeft], cl194 mov dx, [bp+MEMPIOVARS.wSectorsInBlock] 195 sub [bp+MEMPIOVARS.bSectorsLeft], dl 196 add [bp+MEMPIOVARS.bSectorsDone], dl 197 cmp [bp+MEMPIOVARS.bSectorsLeft], dl 198 198 ja SHORT .WriteNextBlockToDrive 199 199 200 200 ALIGN JUMP_ALIGN 201 201 .WriteLastBlockToDrive: 202 mov cl, [bp+MEMPIOVARS.bSectorsLeft]203 push cx202 mov dl, [bp+MEMPIOVARS.bSectorsLeft] 203 push dx 204 204 ePUSH_T bx, CheckErrorsAfterTransferringLastMemoryMappedBlock 205 205 ; Fall to WriteSingleBlockFromDSSIToSectorAccessWindowInESDI … … 208 208 ; WriteSingleBlockFromDSSIToSectorAccessWindowInESDI 209 209 ; Parameters: 210 ; CX: Number of sectors in block210 ; DX: Number of sectors in block 211 211 ; DS:SI: Normalized ptr to source buffer 212 212 ; ES:DI: Ptr to Sector Access Window … … 220 220 WriteSingleBlockFromDSSIToSectorAccessWindowInESDI: 221 221 mov bx, di 222 mov dx, cx223 222 xor cx, cx 224 223 ALIGN JUMP_ALIGN … … 235 234 ; ReadSingleBlockFromSectorAccessWindowInDSSItoESDI 236 235 ; Parameters: 237 ; CX Number of sectors in full block or sectors in last partialblock238 ; ES:DI: Normalized ptr to buffer to receive data (destination)239 ; DS:SI: Ptr to Sector Access Window (source)236 ; DX: Number of sectors in block 237 ; ES:DI: Normalized ptr to destination buffer 238 ; DS:SI: Ptr to Sector Access Window 240 239 ; Returns: 241 240 ; CX, DX: Zero … … 247 246 ReadSingleBlockFromSectorAccessWindowInDSSItoESDI: 248 247 mov bx, si 249 mov dx, cx250 248 xor cx, cx 251 249 ALIGN JUMP_ALIGN
Note:
See TracChangeset
for help on using the changeset viewer.