83Plus:Software:usb8x/Asm Interface/MSD/UFI Read

From WikiTI
Revision as of 23:54, 16 August 2006 by Brandonw (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Synopsis

Name: UFI_Read

Minimum usb8x version: 0.10

Reads one sector from (MSDLBA) address and stores in sector buffer.

Inputs

  • (MSDLBA) contains LBA address of sector to read

Outputs

  • Sector buffer contains (MBDLBA) sector

Destroys

  • AF, BC, DE, HL

Notes

(MSDLBA) is a 4-byte area in the mass storage driver's internal memory buffer used by this routine. The following example code would set the value to zero, where appBackUpScreen is where the mass storage internal buffer is:

xor a
ld (appBackUpScreen+MSDLBA),a
ld (appBackUpScreen+MSDLBA+1),a
ld (appBackUpScreen+MSDLBA+2),a
ld (appBackUpScreen+MSDLBA+3),a

This is just to demonstrate where MSDLBA is in memory. See [[../MSD_Initialize|MSD_Initialize]] for more information about the internal buffer used by the mass storage driver.

See Also

  • [[../MSD_Initialize|MSD_Initialize]] - Initializes the mass storage driver