Changeset 475 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Device/IDE
- Timestamp:
- Oct 12, 2012, 8:21:26 PM (12 years ago)
- google:author:
- aitotat@gmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/JrIdeTransfer.asm
r474 r475 100 100 ; 1 if any error 101 101 ; Corrupts registers: 102 ; AL, BX, DX, SI , ES102 ; AL, BX, DX, SI 103 103 ;-------------------------------------------------------------------- 104 104 ReadFromSectorAccessWindow: … … 107 107 jc SHORT ReturnWithMemoryIOtransferErrorInAH 108 108 109 mov cx, [bp+MEMPIOVARS.wSectorsInBlock] 109 mov cx, [bp+MEMPIOVARS.wSectorsInBlock] ; Clears CH 110 110 cmp [bp+MEMPIOVARS.bSectorsLeft], cl 111 111 jbe SHORT .ReadLastBlockFromDrive … … 138 138 139 139 ; All sectors successfully transferred 140 add c x, [bp+PIOVARS.bSectorsDone]; Never sets CF140 add cl, [bp+MEMPIOVARS.bSectorsDone] ; Never sets CF 141 141 ret 142 142 … … 145 145 lds di, [bp+MEMPIOVARS.fpDPT] ; DPT now in DS:DI 146 146 %ifdef USE_386 147 movzx cx, [bp+MEMPIOVARS.bSectorsDone]147 movzx cx, BYTE [bp+MEMPIOVARS.bSectorsDone] 148 148 %else 149 mov ch, 0 149 mov ch, 0 ; Preserve CF 150 150 mov cl, [bp+MEMPIOVARS.bSectorsDone] 151 151 %endif … … 220 220 xor cl, cl 221 221 ALIGN JUMP_ALIGN 222 .Write Block:222 .WriteNextSector: 223 223 mov ch, SECTOR_ACCESS_WINDOW_SIZE >> 9 224 224 rep movsw 225 225 mov di, bx ; Reset for next sector 226 226 dec dx 227 jnz SHORT .Write Block227 jnz SHORT .WriteNextSector 228 228 ret 229 229 … … 232 232 ; ReadSingleBlockFromSectorAccessWindowInDSSItoESDI 233 233 ; Parameters: 234 ; CX Number of sectors in block234 ; CX Number of sectors in full block or sectors in last partial block 235 235 ; ES:DI: Normalized ptr to buffer to receive data (destination) 236 236 ; DS:SI: Ptr to Sector Access Window (source) … … 247 247 xor cl, cl 248 248 ALIGN JUMP_ALIGN 249 .Read Block:249 .ReadNextSector: 250 250 mov ch, SECTOR_ACCESS_WINDOW_SIZE >> 9 251 251 rep movsw 252 252 mov si, bx ; Reset for next sector 253 253 dec dx 254 jnz SHORT .Read Block254 jnz SHORT .ReadNextSector 255 255 ret 256 256
Note:
See TracChangeset
for help on using the changeset viewer.