<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: lba code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Tue, 30 Sep 2008 23:17:59 GMT</pubDate>
    <description>DZone Snippets: lba code</description>
    <item>
      <title>Converting diskette LBA to CHS</title>
      <link>http://snippets.dzone.com/posts/show/3130</link>
      <description>// description of your code here&lt;br /&gt;&lt;br /&gt;Put LBA address in AX and get your results in CL, CH and DH.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;;-----------------------------------------------------------------------------;&lt;br /&gt;;		DISKETTE_LBA_TO_CHS(AX LBA) CL Head, CH Cylinder, DH Sector   ;&lt;br /&gt;;-----------------------------------------------------------------------------;&lt;br /&gt;diskette_lba_to_chs:&lt;br /&gt;	xor dx, dx&lt;br /&gt;	mov bx, 18&lt;br /&gt;        div bx&lt;br /&gt;	push dx				; = Stack(1)			&lt;br /&gt;	mov dx, ax&lt;br /&gt;        shr ax, 2&lt;br /&gt;	mov cl, al&lt;br /&gt;	mov ch, dl&lt;br /&gt;	pop dx				; = Stack(0)&lt;br /&gt;	inc dl&lt;br /&gt;	mov dh, dl&lt;br /&gt;	ret&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Tue, 12 Dec 2006 02:05:46 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3130</guid>
      <author>darktemplar (Piotr)</author>
    </item>
  </channel>
</rss>
