Compare commits
2 Commits
026406c355
...
1a5c7d1820
Author | SHA1 | Date | |
---|---|---|---|
1a5c7d1820 | |||
988f84e5c1 |
@ -99,8 +99,8 @@ andi.l #0x1FF, d0 | Modulus start byte by 512 to compute sector data offset
|
||||
move.l #0x1FF, d1 | Compute the number of bytes to transfer by subtracting the offset from 512
|
||||
sub.l d0, d1
|
||||
cmp d7, d1 | Compare the number of bytes to transfer with the byte count
|
||||
ble.b count_ok | If it wass less than the byte count, do not adjust the bytes to transfer
|
||||
move.l d7, d1 | Otherwis:e, cap the transfer count to the total byte count
|
||||
ble.b count_ok | If it was less than the byte count, do not adjust the bytes to transfer
|
||||
move.l d7, d1 | Otherwise, cap the transfer count to the total byte count
|
||||
count_ok:
|
||||
move.l d1, d6 | Save the number of bytes in d6
|
||||
subi.l #1, d1 | Subtract 1 from the number of bytes to account for the extra loop done by dbra
|
||||
@ -126,7 +126,6 @@ move.l #1, d1 | Set the number of sectors to read to 1
|
||||
move.l #SEC_BUF_START, a1 | Set the read address of the sector to the sector buffer
|
||||
bsr.b read_sectors | Read the end sector
|
||||
move.l d6, d1 | Load the number of remaining bytes into d1
|
||||
andi #0x1FF, d1 | Modulus the number of remaining bytes by 512 to compute the number of bytes to copy from the end sector
|
||||
end_sec_loop: | Transfer the required bytes from the start sector to the destination buffer
|
||||
move.b (a1)+, (a2)+
|
||||
dbra d1, end_sec_loop
|
||||
|
Loading…
Reference in New Issue
Block a user