Having two arrays will mean some future code will need to be
duplicated (two for loops will always be needed). It is not user
friendly. With the code you suggested, you will still need an easy way
of reading those arrays as one array. This would keep compatibility.
This would slow things down, but give it a try. What OSC speed are you
using?
function pata_hd_sector_buffer'get(word in address) return byte is
pragma inline
if address < 256 then
return pata_hd_sector_buffer_lo[address]
else
address = address - 256
return pata_hd_sector_buffer_hi[address]
end if
end function
You would have to compare these:
var byte abcd
var word step1
for 512 using step1 loop
abcd = pata_hd_sector_buffer[step1 ] -- using above procedure
end loop
-- OR
var byte abcd
var byte step1
for 256 using step1 loop
abcd = pata_hd_sector_buffer_lo[step1] -- using arrays directly
end loop
for 256 using step1 loop
abcd = pata_hd_sector_buffer_hi[step1]
end loop
I think you have to take into account how you are going to actually
use the data. The array for a sector read/write should be 512 bytes.
Any other project you find on the net will use 512 bytes, not 256. But
maybe this is the job of Fat32?
Matt.
--
You received this message because you are subscribed to the Google Groups
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jallib?hl=en.