X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=doc%2Fdio.sgml;h=83a2edc4d58d7ccb4c50b5d636ca8c0b3a05423e;hb=d3ac0849973fd40751339151a2b6ef8f950b560d;hp=efd9d23e1cd3f36fc7a0932984128506a7b43b3e;hpb=ecaaf8b3eccf5755c0bc51846a05912e547108a5;p=cc65 diff --git a/doc/dio.sgml b/doc/dio.sgml index efd9d23e1..83a2edc4d 100644 --- a/doc/dio.sgml +++ b/doc/dio.sgml @@ -3,7 +3,7 @@
Diskette Sector I/O Routines <author>Christian Groessler, <htmlurl url="mailto:cpg@aladdin.de" name="cpg@aladdin.de"> -<date>21.11.2000 +<date>20-Feb-2005 <abstract> The cc65 library provides functions to read and write raw disk sectors. @@ -45,7 +45,7 @@ The read and write functions are: void *buffer); </verb></tscreen> -This function will read the sector specified by sect_num into the memory +This function will read the sector specified by <tt>sect_num</tt> into the memory location at buffer. <tscreen><verb> @@ -67,10 +67,24 @@ This function will write the memory contents at buffer to the sector specified by <tt>sect_num</tt>. A verification is performed. <p> +Use the <tt><ref name="dio_query_sectsize" id="sectsize"></tt> function to query the size of a sector. + All these functions will return 0 for success and an OS specific error code in case of failure. <p> +<sect>Querying sector size<label id="sectsize"><p> + +Some systems support multiple diskette formats which have different sector sizes. +The following function returns the sector size of the currently inserted disk: + +<tscreen><verb> + sectsize_t __fastcall__ dio_query_sectsize(dhandle_t handle); +</verb></tscreen> + +On the Atari platform, the sector size is handled specially. Please refer +to the DIO section in the <htmlurl url="atari.html" name="Atari"> +specific platform documentation. <sect>Converting sector numbers<p>