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

From WikiTI
Jump to: navigation, search

Synopsis

Name: UFI_getCapacity

Minimum usb8x version: 0.12

Gets capacity of entire drive and sets up bytes-per-sector (MSDBPS).

Inputs

  • None

Outputs

  • OP1 contains output of formatted medium in bytes
  • (MSDBPS) set up accordingly
  • C set if problems

Destroys

  • AF, BC, DE, HL
  • OP2

Notes

This entry point should only be used if you are writing your own file system driver. It will set up (MSDBPS) in the mass storage driver's memory (which will almost always be 512). However, checking the return status of this entry point is extremely important.

See Also

  • [[../UFI_Initialize|UFI_Initialize]] - Initializes mass storage device for sector read/write operations