⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dio-3.html

📁 cc65 的编译器文档
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><HTML><HEAD> <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.20"> <TITLE>Diskette Sector I/O Routines: Converting sector numbers</TITLE> <LINK HREF="dio-2.html" REL=previous> <LINK HREF="dio.html#toc3" REL=contents></HEAD><BODY>Next<A HREF="dio-2.html">Previous</A><A HREF="dio.html#toc3">Contents</A><HR><H2><A NAME="s3">3.</A> <A HREF="dio.html#toc3">Converting sector numbers</A></H2><P>Since the read and write functions expect a sector number, for systems wherethe sectors aren't addressed by a logical sector number (e.g. CBM drives),there are 2 conversion functions. One of them converts a logical sector numberto a head/track/sector triple. The other conversion function works the otherway round.</P><P><BLOCKQUOTE><CODE><PRE>    unsigned char __fastcall__ dio_phys_to_log (dhandle_t handle,                                                const dio_phys_pos *physpos,                                                sectnum_t *sectnum);</PRE></CODE></BLOCKQUOTE></P><P>This function converts track/head/sector to logical sector number.</P><P><BLOCKQUOTE><CODE><PRE>    unsigned char __fastcall__ dio_log_to_phys(_dhandle_t handle,                                                const _sectnum_t *sectnum,                                                dio_phys_pos *physpos);</PRE></CODE></BLOCKQUOTE></P><P>This function converts a logical sector number to track/head/sector notation.</P><P>Note, that on systems which natively use logical sector numbers (e.g. Atari),the conversion functions are dummies. They ignore head/track(<CODE>dio_phys_to_log</CODE>) or return them as zero (<CODE>dio_log_to_phys</CODE>).The logical sector number is returned as physical sector and vice versa.</P><HR>Next<A HREF="dio-2.html">Previous</A><A HREF="dio.html#toc3">Contents</A></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -