Is it possible to skip the first 50 bytes and read the next 150 bytes of sector of disk drive through
DMA? Explain clearly with your own words.
Answers
No The READ DMA and READ BUFFER DMA read from the beginning of a sector.
Do you need to read sectors in to a specific memory address, but not including the beginning of the first sector? I did.
I had a situation where I needed to receive a message into memory, starting at a memory address in the middle of a large block of memory that already had information up to this address. What I needed was all of a message except for its first few header bytes.
The memory block had already been filled up to position x. Reading the message into position x+1 would read in h header bytes of undesired content and put the desired content in the wrong place. I didn’t want to read it in that way and then shift the information back h places piece by piece.
Instead, I imagined a dance where the left foot pushes something out of the way, the right foot steps on the area, then the left foot moves the thing back to its original position.