Sha256: 64911085e8dfc9d2180320452979c5b9b94b622b29ac97c1dbf2281006d2a604
Contents?: true
Size: 1.54 KB
Versions: 30
Compression:
Stored size: 1.54 KB
Contents
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>is_dos33? (DSK)</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> </head> <body class="standalone-code"> <pre><span class="ruby-comment cmt"># File lib/DSK.rb, line 13</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">is_dos33?</span> <span class="ruby-comment cmt"># VTOC is at offset 0x11000</span> <span class="ruby-comment cmt"># bytes 1/2/3 are a track number, sector number and DOS version number</span> <span class="ruby-comment cmt"># see if these are reasonable values</span> (<span class="ruby-ivar">@file_bytes</span>[<span class="ruby-value">0x11001</span>]<span class="ruby-operator"><=</span><span class="ruby-value">34</span>) <span class="ruby-operator">&&</span> (<span class="ruby-ivar">@file_bytes</span>[<span class="ruby-value">0x11002</span>]<span class="ruby-operator"><=</span><span class="ruby-value">15</span>) <span class="ruby-operator">&&</span> (<span class="ruby-ivar">@file_bytes</span>[<span class="ruby-value">0x11003</span>]<span class="ruby-operator">==</span><span class="ruby-value">3</span>) <span class="ruby-keyword kw">end</span></pre> </body> </html>
Version data entries
30 entries across 8 versions & 1 rubygems