dsktool 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. data/bin/dsktool.rb +14 -7
  2. data/doc/classes/AppleSoftFile.html +19 -18
  3. data/doc/classes/AppleSoftFile.src/M000011.html +4 -4
  4. data/doc/classes/AppleSoftFile.src/M000012.html +4 -4
  5. data/doc/classes/AppleSoftFile.src/M000013.html +18 -0
  6. data/doc/classes/AppleSoftFile.src/M000014.html +18 -0
  7. data/doc/classes/BinaryFile.html +19 -18
  8. data/doc/classes/BinaryFile.src/M000024.html +4 -4
  9. data/doc/classes/BinaryFile.src/M000025.html +4 -5
  10. data/doc/classes/BinaryFile.src/M000026.html +19 -0
  11. data/doc/classes/BinaryFile.src/M000029.html +18 -0
  12. data/doc/classes/BinaryFile.src/M000030.html +18 -0
  13. data/doc/classes/BinaryFile.src/M000031.html +19 -0
  14. data/doc/classes/D65.html +10 -10
  15. data/doc/classes/D65.src/M000009.html +4 -50
  16. data/doc/classes/D65.src/M000010.html +18 -0
  17. data/doc/classes/D65.src/M000011.html +64 -0
  18. data/doc/classes/DOSDisk.html +15 -15
  19. data/doc/classes/DOSDisk.src/M000014.html +6 -5
  20. data/doc/classes/DOSDisk.src/M000015.html +6 -62
  21. data/doc/classes/DOSDisk.src/M000016.html +19 -0
  22. data/doc/classes/DOSDisk.src/M000017.html +76 -0
  23. data/doc/classes/DOSFile.html +19 -18
  24. data/doc/classes/DOSFile.src/M000027.html +8 -3
  25. data/doc/classes/DOSFile.src/M000028.html +3 -4
  26. data/doc/classes/DOSFile.src/M000029.html +18 -0
  27. data/doc/classes/DOSFile.src/M000032.html +22 -0
  28. data/doc/classes/DOSFile.src/M000033.html +17 -0
  29. data/doc/classes/DOSFile.src/M000034.html +18 -0
  30. data/doc/classes/DSK.html +35 -35
  31. data/doc/classes/DSK.src/M000017.html +8 -8
  32. data/doc/classes/DSK.src/M000018.html +8 -13
  33. data/doc/classes/DSK.src/M000019.html +8 -5
  34. data/doc/classes/DSK.src/M000020.html +20 -4
  35. data/doc/classes/DSK.src/M000021.html +4 -25
  36. data/doc/classes/DSK.src/M000022.html +4 -9
  37. data/doc/classes/DSK.src/M000023.html +40 -0
  38. data/doc/classes/DSK.src/M000024.html +23 -0
  39. data/doc/classes/IntegerBasicFile.html +19 -18
  40. data/doc/classes/IntegerBasicFile.src/M000005.html +4 -4
  41. data/doc/classes/IntegerBasicFile.src/M000006.html +4 -4
  42. data/doc/classes/IntegerBasicFile.src/M000007.html +18 -0
  43. data/doc/classes/IntegerBasicFile.src/M000008.html +18 -0
  44. data/doc/classes/RDoc.html +5 -5
  45. data/doc/classes/RDoc.src/M000033.html +40 -0
  46. data/doc/classes/RDoc.src/M000038.html +40 -0
  47. data/doc/classes/SCAsmFile.html +226 -0
  48. data/doc/classes/SCAsmFile.src/M000025.html +18 -0
  49. data/doc/classes/SCAsmFile.src/M000026.html +18 -0
  50. data/doc/classes/SCAsmFile.src/M000027.html +18 -0
  51. data/doc/classes/SCAsmFile.src/M000028.html +36 -0
  52. data/doc/classes/TestDOSDisks.html +31 -1
  53. data/doc/classes/TestDOSDisks.src/M000003.html +3 -21
  54. data/doc/classes/TestDOSDisks.src/M000004.html +41 -0
  55. data/doc/classes/TestDOSDisks.src/M000005.html +27 -0
  56. data/doc/classes/TestDisassembly.html +5 -5
  57. data/doc/classes/TestDisassembly.src/M000008.html +19 -0
  58. data/doc/classes/TestDisassembly.src/M000009.html +19 -0
  59. data/doc/classes/TextFile.html +19 -18
  60. data/doc/classes/TextFile.src/M000030.html +4 -4
  61. data/doc/classes/TextFile.src/M000031.html +4 -6
  62. data/doc/classes/TextFile.src/M000032.html +20 -0
  63. data/doc/classes/TextFile.src/M000035.html +18 -0
  64. data/doc/classes/TextFile.src/M000036.html +18 -0
  65. data/doc/classes/TextFile.src/M000037.html +20 -0
  66. data/doc/created.rid +1 -1
  67. data/doc/dot/f_3.dot +13 -0
  68. data/doc/dot/f_3.png +0 -0
  69. data/doc/files/bin/dsktool_rb.html +32 -22
  70. data/doc/files/lib/DOSDisk_rb.html +1 -1
  71. data/doc/files/lib/DOSFile_rb.html +5 -4
  72. data/doc/files/lib/DSK_rb.html +3 -1
  73. data/doc/files/test/tc_dos_disks_rb.html +1 -1
  74. data/doc/fr_class_index.html +1 -0
  75. data/doc/fr_method_index.html +36 -30
  76. data/lib/CHANGES.txt +5 -0
  77. data/lib/DOSDisk.rb +1 -1
  78. data/lib/DOSFile.rb +91 -0
  79. data/lib/DSK.rb +10 -2
  80. data/test/AAL_1.DSK +0 -0
  81. data/test/tc_dos_disks.rb +25 -3
  82. metadata +37 -1
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>file_type (SCAsmFile)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/DOSFile.rb, line 355</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">file_type</span>
15
+ <span class="ruby-value str">&quot;I&quot;</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>to_s (SCAsmFile)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/DOSFile.rb, line 359</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
15
+ <span class="ruby-constant">SCAsmFile</span>.<span class="ruby-identifier">buffer_as_scasm_file</span>(<span class="ruby-ivar">@contents</span>)
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>file_extension (SCAsmFile)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/DOSFile.rb, line 363</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">file_extension</span>
15
+ <span class="ruby-value str">&quot;.asm&quot;</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,36 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>can_be_scasm_file (SCAsmFile)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/DOSFile.rb, line 367</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">SCAsmFile</span>.<span class="ruby-identifier">can_be_scasm_file</span>(<span class="ruby-identifier">buffer</span>)
15
+ <span class="ruby-identifier">length</span>=<span class="ruby-identifier">buffer</span>[<span class="ruby-value">0</span>]<span class="ruby-operator">+</span><span class="ruby-identifier">buffer</span>[<span class="ruby-value">1</span>]<span class="ruby-operator">*</span><span class="ruby-value">256</span>
16
+ <span class="ruby-identifier">index</span>=<span class="ruby-value">2</span>
17
+ <span class="ruby-identifier">s</span>=<span class="ruby-value str">&quot;&quot;</span>
18
+ <span class="ruby-keyword kw">while</span> (<span class="ruby-identifier">index</span><span class="ruby-operator">&lt;</span><span class="ruby-identifier">length</span>)
19
+ <span class="ruby-identifier">line_length</span>=<span class="ruby-identifier">buffer</span>[<span class="ruby-identifier">index</span>]
20
+ <span class="ruby-identifier">line_no</span>=<span class="ruby-identifier">buffer</span>[<span class="ruby-identifier">index</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>]<span class="ruby-operator">+</span><span class="ruby-identifier">buffer</span>[<span class="ruby-identifier">index</span><span class="ruby-operator">+</span><span class="ruby-value">2</span>]<span class="ruby-operator">*</span><span class="ruby-value">256</span>
21
+ <span class="ruby-identifier">index</span><span class="ruby-operator">+=</span><span class="ruby-value">3</span> <span class="ruby-comment cmt">#skip over the &quot;line number&quot; field</span>
22
+ <span class="ruby-comment cmt">#S-C Assembler lines always ends with a 0x00 </span>
23
+ <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">buffer</span>[<span class="ruby-identifier">index</span><span class="ruby-operator">+</span><span class="ruby-identifier">line_length</span><span class="ruby-operator">-</span><span class="ruby-value">4</span>] <span class="ruby-operator">!=</span> <span class="ruby-value">0x00</span> )
24
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
25
+ <span class="ruby-keyword kw">end</span>
26
+ <span class="ruby-identifier">buffer</span>[<span class="ruby-identifier">index</span><span class="ruby-operator">..</span><span class="ruby-identifier">index</span><span class="ruby-operator">+</span><span class="ruby-identifier">line_length</span><span class="ruby-operator">-</span><span class="ruby-value">3</span>].<span class="ruby-identifier">each_byte</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">b</span><span class="ruby-operator">|</span>
27
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">b</span><span class="ruby-operator">&gt;</span><span class="ruby-value">0xc0</span> <span class="ruby-keyword kw">then</span>
28
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
29
+ <span class="ruby-keyword kw">end</span>
30
+ <span class="ruby-keyword kw">end</span>
31
+ <span class="ruby-identifier">index</span><span class="ruby-operator">+=</span> <span class="ruby-identifier">line_length</span><span class="ruby-operator">-</span><span class="ruby-value">3</span>
32
+ <span class="ruby-keyword kw">end</span>
33
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
34
+ <span class="ruby-keyword kw">end</span></pre>
35
+ </body>
36
+ </html>
@@ -95,7 +95,9 @@
95
95
  <div class="name-list">
96
96
  <a href="#M000001">test_bad_dsks</a>&nbsp;&nbsp;
97
97
  <a href="#M000002">test_empty_dsk</a>&nbsp;&nbsp;
98
- <a href="#M000003">test_simple_dos_dsk</a>&nbsp;&nbsp;
98
+ <a href="#M000003">test_open_url_to_compressed_dsk</a>&nbsp;&nbsp;
99
+ <a href="#M000005">test_scasm_file</a>&nbsp;&nbsp;
100
+ <a href="#M000004">test_simple_dos_dsk</a>&nbsp;&nbsp;
99
101
  </div>
100
102
  </div>
101
103
 
@@ -151,6 +153,34 @@
151
153
  <div class="method-heading">
152
154
  <a href="TestDOSDisks.src/M000003.html" target="Code" class="method-signature"
153
155
  onclick="popupCode('TestDOSDisks.src/M000003.html');return false;">
156
+ <span class="method-name">test_open_url_to_compressed_dsk</span><span class="method-args">()</span>
157
+ </a>
158
+ </div>
159
+
160
+ <div class="method-description">
161
+ </div>
162
+ </div>
163
+
164
+ <div id="method-M000005" class="method-detail">
165
+ <a name="M000005"></a>
166
+
167
+ <div class="method-heading">
168
+ <a href="TestDOSDisks.src/M000005.html" target="Code" class="method-signature"
169
+ onclick="popupCode('TestDOSDisks.src/M000005.html');return false;">
170
+ <span class="method-name">test_scasm_file</span><span class="method-args">()</span>
171
+ </a>
172
+ </div>
173
+
174
+ <div class="method-description">
175
+ </div>
176
+ </div>
177
+
178
+ <div id="method-M000004" class="method-detail">
179
+ <a name="M000004"></a>
180
+
181
+ <div class="method-heading">
182
+ <a href="TestDOSDisks.src/M000004.html" target="Code" class="method-signature"
183
+ onclick="popupCode('TestDOSDisks.src/M000004.html');return false;">
154
184
  <span class="method-name">test_simple_dos_dsk</span><span class="method-args">()</span>
155
185
  </a>
156
186
  </div>
@@ -5,14 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>test_simple_dos_dsk (TestDOSDisks)</title>
8
+ <title>test_open_url_to_compressed_dsk (TestDOSDisks)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
13
  <pre><span class="ruby-comment cmt"># File test/tc_dos_disks.rb, line 20</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_simple_dos_dsk</span>
15
- <span class="ruby-identifier">dskname</span>=<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword kw">__FILE__</span>)<span class="ruby-operator">+</span><span class="ruby-value str">&quot;//dos33_with_adt.dsk&quot;</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_open_url_to_compressed_dsk</span>
15
+ <span class="ruby-identifier">dskname</span>=<span class="ruby-value str">&quot;http://www.apple2.org.za/mirrors/ftp.apple.asimov.net/images/games/adventure/vaults_of_zurich.dsk.gz&quot;</span>
16
16
  <span class="ruby-identifier">dsk</span>=<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">dskname</span>)
17
17
  <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">is_dos33?</span>,<span class="ruby-node">&quot;#{dskname} should be DOS 3.3 format&quot;</span>)
18
18
  <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">files</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">&gt;</span><span class="ruby-value">0</span>,<span class="ruby-node">&quot;#{dskname} should have at least one file&quot;</span>)
@@ -20,24 +20,6 @@
20
20
  <span class="ruby-identifier">hello_file</span>=<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">files</span>[<span class="ruby-value str">&quot;HELLO&quot;</span>]
21
21
  <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">hello_file!</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-node">&quot;#{dskname} should have a file called HELLO&quot;</span>)
22
22
  <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">hello_file</span>.<span class="ruby-identifier">instance_of?</span>(<span class="ruby-constant">AppleSoftFile</span>),<span class="ruby-value str">&quot;HELLO should be an AppleSoft file&quot;</span>)
23
- <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">hello_file</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">&gt;</span><span class="ruby-value">0</span>,<span class="ruby-value str">&quot;HELLO should have non-zero length&quot;</span>)
24
- <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">hello_file</span>.<span class="ruby-identifier">to_s</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">5</span>]<span class="ruby-operator">==</span><span class="ruby-value str">&quot;10 REM&quot;</span>,<span class="ruby-value str">&quot;HELLO should start '10 REM'&quot;</span>)
25
-
26
- <span class="ruby-identifier">binary_file</span>=<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">files</span>[<span class="ruby-value str">&quot;MUFFIN&quot;</span>]
27
- <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">binary_file!</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-node">&quot;#{dskname} should have a file called MUFFIN&quot;</span>)
28
- <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">binary_file</span>.<span class="ruby-identifier">instance_of?</span>(<span class="ruby-constant">BinaryFile</span>),<span class="ruby-value str">&quot;HELLO should be an Binary file&quot;</span>)
29
- <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">binary_file</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">&gt;</span><span class="ruby-value">0</span>,<span class="ruby-value str">&quot;MUFFIN should have non-zero length&quot;</span>)
30
- <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">binary_file</span>.<span class="ruby-identifier">disassembly</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">&gt;</span><span class="ruby-value">0</span>,<span class="ruby-value str">&quot;MUFFIN disassembly should have non-zero length&quot;</span>)
31
- <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">binary_file</span>.<span class="ruby-identifier">disassembly</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">4</span>]<span class="ruby-operator">==</span><span class="ruby-value str">&quot;0803:&quot;</span>,<span class="ruby-value str">&quot;MUFFIN disassembly should start at $803&quot;</span>)
32
-
33
-
34
- <span class="ruby-identifier">integer_file</span>=<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">files</span>[<span class="ruby-value str">&quot;APPLESOFT&quot;</span>]
35
- <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">integer_file!</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-node">&quot;#{dskname} should have a file called APPLESOFT&quot;</span>)
36
- <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">integer_file</span>.<span class="ruby-identifier">instance_of?</span>(<span class="ruby-constant">IntegerBasicFile</span>),<span class="ruby-value str">&quot;HELLO should be an IntegetBasic file&quot;</span>)
37
- <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">integer_file</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">&gt;</span><span class="ruby-value">0</span>,<span class="ruby-value str">&quot;APPLESOFT should have non-zero length&quot;</span>)
38
- <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">integer_file</span>.<span class="ruby-identifier">to_s</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">5</span>]<span class="ruby-operator">==</span><span class="ruby-value str">&quot;10 REM&quot;</span>,<span class="ruby-value str">&quot;APPLESOFT should start '10 REM'&quot;</span>)
39
-
40
-
41
23
  <span class="ruby-keyword kw">end</span></pre>
42
24
  </body>
43
25
  </html>
@@ -0,0 +1,41 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>test_simple_dos_dsk (TestDOSDisks)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File test/tc_dos_disks.rb, line 31</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_simple_dos_dsk</span>
15
+ <span class="ruby-identifier">dskname</span>=<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword kw">__FILE__</span>)<span class="ruby-operator">+</span><span class="ruby-value str">&quot;//dos33_with_adt.dsk&quot;</span>
16
+ <span class="ruby-identifier">dsk</span>=<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">dskname</span>)
17
+ <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">is_dos33?</span>,<span class="ruby-node">&quot;#{dskname} should be DOS 3.3 format&quot;</span>)
18
+ <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">files</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">&gt;</span><span class="ruby-value">0</span>,<span class="ruby-node">&quot;#{dskname} should have at least one file&quot;</span>)
19
+
20
+ <span class="ruby-identifier">hello_file</span>=<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">files</span>[<span class="ruby-value str">&quot;HELLO&quot;</span>]
21
+ <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">hello_file!</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-node">&quot;#{dskname} should have a file called HELLO&quot;</span>)
22
+ <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">hello_file</span>.<span class="ruby-identifier">instance_of?</span>(<span class="ruby-constant">AppleSoftFile</span>),<span class="ruby-value str">&quot;HELLO should be an AppleSoft file&quot;</span>)
23
+ <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">hello_file</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">&gt;</span><span class="ruby-value">0</span>,<span class="ruby-value str">&quot;HELLO should have non-zero length&quot;</span>)
24
+ <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">hello_file</span>.<span class="ruby-identifier">to_s</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">5</span>]<span class="ruby-operator">==</span><span class="ruby-value str">&quot;10 REM&quot;</span>,<span class="ruby-value str">&quot;HELLO should start '10 REM'&quot;</span>)
25
+
26
+ <span class="ruby-identifier">binary_file</span>=<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">files</span>[<span class="ruby-value str">&quot;MUFFIN&quot;</span>]
27
+ <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">binary_file!</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-node">&quot;#{dskname} should have a file called MUFFIN&quot;</span>)
28
+ <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">binary_file</span>.<span class="ruby-identifier">instance_of?</span>(<span class="ruby-constant">BinaryFile</span>),<span class="ruby-value str">&quot;HELLO should be an Binary file&quot;</span>)
29
+ <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">binary_file</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">&gt;</span><span class="ruby-value">0</span>,<span class="ruby-value str">&quot;MUFFIN should have non-zero length&quot;</span>)
30
+ <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">binary_file</span>.<span class="ruby-identifier">disassembly</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">&gt;</span><span class="ruby-value">0</span>,<span class="ruby-value str">&quot;MUFFIN disassembly should have non-zero length&quot;</span>)
31
+ <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">binary_file</span>.<span class="ruby-identifier">disassembly</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">4</span>]<span class="ruby-operator">==</span><span class="ruby-value str">&quot;0803:&quot;</span>,<span class="ruby-value str">&quot;MUFFIN disassembly should start at $803&quot;</span>)
32
+
33
+
34
+ <span class="ruby-identifier">integer_file</span>=<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">files</span>[<span class="ruby-value str">&quot;APPLESOFT&quot;</span>]
35
+ <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">integer_file!</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-node">&quot;#{dskname} should have a file called APPLESOFT&quot;</span>)
36
+ <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">integer_file</span>.<span class="ruby-identifier">instance_of?</span>(<span class="ruby-constant">IntegerBasicFile</span>),<span class="ruby-value str">&quot;HELLO should be an IntegetBasic file&quot;</span>)
37
+ <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">integer_file</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">&gt;</span><span class="ruby-value">0</span>,<span class="ruby-value str">&quot;APPLESOFT should have non-zero length&quot;</span>)
38
+ <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">integer_file</span>.<span class="ruby-identifier">to_s</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">5</span>]<span class="ruby-operator">==</span><span class="ruby-value str">&quot;10 REM&quot;</span>,<span class="ruby-value str">&quot;APPLESOFT should start '10 REM'&quot;</span>)
39
+ <span class="ruby-keyword kw">end</span></pre>
40
+ </body>
41
+ </html>
@@ -0,0 +1,27 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>test_scasm_file (TestDOSDisks)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File test/tc_dos_disks.rb, line 58</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_scasm_file</span>
15
+ <span class="ruby-identifier">dskname</span>=<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword kw">__FILE__</span>)<span class="ruby-operator">+</span><span class="ruby-value str">&quot;//AAL_1.DSK&quot;</span>
16
+ <span class="ruby-identifier">dsk</span>=<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">dskname</span>)
17
+ <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">is_dos33?</span>,<span class="ruby-node">&quot;#{dskname} should be DOS 3.3 format&quot;</span>)
18
+ <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">files</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">&gt;</span><span class="ruby-value">0</span>,<span class="ruby-node">&quot;#{dskname} should have at least one file&quot;</span>)
19
+
20
+ <span class="ruby-identifier">asm_file</span>=<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">files</span>[<span class="ruby-value str">&quot;MORSE CODE&quot;</span>]
21
+ <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">asm_file!</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-node">&quot;#{dskname} should have a file called MORSE CODE&quot;</span>)
22
+ <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">asm_file</span>.<span class="ruby-identifier">instance_of?</span>(<span class="ruby-constant">SCAsmFile</span>),<span class="ruby-value str">&quot;MORSE CODE should be an SCasm file&quot;</span>)
23
+ <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">asm_file</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">&gt;</span><span class="ruby-value">0</span>,<span class="ruby-value str">&quot;MORSE CODE should have non-zero length&quot;</span>)
24
+ <span class="ruby-identifier">assert</span>(<span class="ruby-operator">!</span>(<span class="ruby-identifier">asm_file</span>.<span class="ruby-identifier">to_s</span><span class="ruby-operator">=~</span><span class="ruby-regexp re">/930\W*.LIST OFF/</span>).<span class="ruby-identifier">nil?</span>,<span class="ruby-value str">&quot;MORSE CODE should start '930 .LIST OFF'&quot;</span>)
25
+ <span class="ruby-keyword kw">end</span></pre>
26
+ </body>
27
+ </html>
@@ -93,7 +93,7 @@
93
93
  <h3 class="section-bar">Methods</h3>
94
94
 
95
95
  <div class="name-list">
96
- <a href="#M000007">test_simple</a>&nbsp;&nbsp;
96
+ <a href="#M000009">test_simple</a>&nbsp;&nbsp;
97
97
  </div>
98
98
  </div>
99
99
 
@@ -115,12 +115,12 @@
115
115
  <div id="methods">
116
116
  <h3 class="section-bar">Public Instance methods</h3>
117
117
 
118
- <div id="method-M000007" class="method-detail">
119
- <a name="M000007"></a>
118
+ <div id="method-M000009" class="method-detail">
119
+ <a name="M000009"></a>
120
120
 
121
121
  <div class="method-heading">
122
- <a href="TestDisassembly.src/M000007.html" target="Code" class="method-signature"
123
- onclick="popupCode('TestDisassembly.src/M000007.html');return false;">
122
+ <a href="TestDisassembly.src/M000009.html" target="Code" class="method-signature"
123
+ onclick="popupCode('TestDisassembly.src/M000009.html');return false;">
124
124
  <span class="method-name">test_simple</span><span class="method-args">()</span>
125
125
  </a>
126
126
  </div>
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>test_simple (TestDisassembly)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File test/tc_disassembly.rb, line 11</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_simple</span>
15
+ <span class="ruby-identifier">assert</span>(<span class="ruby-regexp re">/RTS/</span>.<span class="ruby-identifier">match</span>(<span class="ruby-constant">D65</span>.<span class="ruby-identifier">disassemble</span>(<span class="ruby-value str">&quot;\x60&quot;</span>)),<span class="ruby-value str">&quot;disassembly of 0x60 should be RTS&quot;</span>)
16
+
17
+ <span class="ruby-keyword kw">end</span></pre>
18
+ </body>
19
+ </html>
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>test_simple (TestDisassembly)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File test/tc_disassembly.rb, line 11</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_simple</span>
15
+ <span class="ruby-identifier">assert</span>(<span class="ruby-regexp re">/RTS/</span>.<span class="ruby-identifier">match</span>(<span class="ruby-constant">D65</span>.<span class="ruby-identifier">disassemble</span>(<span class="ruby-value str">&quot;\x60&quot;</span>)),<span class="ruby-value str">&quot;disassembly of 0x60 should be RTS&quot;</span>)
16
+
17
+ <span class="ruby-keyword kw">end</span></pre>
18
+ </body>
19
+ </html>
@@ -83,9 +83,10 @@
83
83
  <map id="map" name="map">
84
84
  <area shape="RECT" coords="5,101,109,149" href="IntegerBasicFile.html" alt="IntegerBasicFile">
85
85
  <area shape="RECT" coords="133,101,227,149" href="AppleSoftFile.html" alt="AppleSoftFile">
86
- <area shape="RECT" coords="251,101,325,149" href="BinaryFile.html" alt="BinaryFile">
87
- <area shape="RECT" coords="197,5,269,53" href="DOSFile.html" alt="DOSFile">
88
- <area shape="RECT" coords="349,101,421,149" href="TextFile.html" alt="TextFile">
86
+ <area shape="RECT" coords="251,101,333,149" href="SCAsmFile.html" alt="SCAsmFile">
87
+ <area shape="RECT" coords="357,101,432,149" href="BinaryFile.html" alt="BinaryFile">
88
+ <area shape="RECT" coords="256,5,328,53" href="DOSFile.html" alt="DOSFile">
89
+ <area shape="RECT" coords="456,101,528,149" href="TextFile.html" alt="TextFile">
89
90
  </map>
90
91
  <img src="../dot/f_3.png" usemap="#map" border=0 alt="TopLevel">
91
92
  </div>
@@ -98,9 +99,9 @@
98
99
  <h3 class="section-bar">Methods</h3>
99
100
 
100
101
  <div class="name-list">
101
- <a href="#M000030">file_extension</a>&nbsp;&nbsp;
102
- <a href="#M000029">file_type</a>&nbsp;&nbsp;
103
- <a href="#M000031">to_s</a>&nbsp;&nbsp;
102
+ <a href="#M000036">file_extension</a>&nbsp;&nbsp;
103
+ <a href="#M000035">file_type</a>&nbsp;&nbsp;
104
+ <a href="#M000037">to_s</a>&nbsp;&nbsp;
104
105
  </div>
105
106
  </div>
106
107
 
@@ -122,12 +123,12 @@
122
123
  <div id="methods">
123
124
  <h3 class="section-bar">Public Instance methods</h3>
124
125
 
125
- <div id="method-M000030" class="method-detail">
126
- <a name="M000030"></a>
126
+ <div id="method-M000036" class="method-detail">
127
+ <a name="M000036"></a>
127
128
 
128
129
  <div class="method-heading">
129
- <a href="TextFile.src/M000030.html" target="Code" class="method-signature"
130
- onclick="popupCode('TextFile.src/M000030.html');return false;">
130
+ <a href="TextFile.src/M000036.html" target="Code" class="method-signature"
131
+ onclick="popupCode('TextFile.src/M000036.html');return false;">
131
132
  <span class="method-name">file_extension</span><span class="method-args">()</span>
132
133
  </a>
133
134
  </div>
@@ -136,12 +137,12 @@
136
137
  </div>
137
138
  </div>
138
139
 
139
- <div id="method-M000029" class="method-detail">
140
- <a name="M000029"></a>
140
+ <div id="method-M000035" class="method-detail">
141
+ <a name="M000035"></a>
141
142
 
142
143
  <div class="method-heading">
143
- <a href="TextFile.src/M000029.html" target="Code" class="method-signature"
144
- onclick="popupCode('TextFile.src/M000029.html');return false;">
144
+ <a href="TextFile.src/M000035.html" target="Code" class="method-signature"
145
+ onclick="popupCode('TextFile.src/M000035.html');return false;">
145
146
  <span class="method-name">file_type</span><span class="method-args">()</span>
146
147
  </a>
147
148
  </div>
@@ -150,12 +151,12 @@
150
151
  </div>
151
152
  </div>
152
153
 
153
- <div id="method-M000031" class="method-detail">
154
- <a name="M000031"></a>
154
+ <div id="method-M000037" class="method-detail">
155
+ <a name="M000037"></a>
155
156
 
156
157
  <div class="method-heading">
157
- <a href="TextFile.src/M000031.html" target="Code" class="method-signature"
158
- onclick="popupCode('TextFile.src/M000031.html');return false;">
158
+ <a href="TextFile.src/M000037.html" target="Code" class="method-signature"
159
+ onclick="popupCode('TextFile.src/M000037.html');return false;">
159
160
  <span class="method-name">to_s</span><span class="method-args">()</span>
160
161
  </a>
161
162
  </div>
@@ -5,14 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>file_extension (TextFile)</title>
8
+ <title>file_type (TextFile)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/DOSFile.rb, line 33</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">file_extension</span>
15
- <span class="ruby-value str">&quot;.txt&quot;</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/DOSFile.rb, line 29</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">file_type</span>
15
+ <span class="ruby-value str">&quot;T&quot;</span>
16
16
  <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>
@@ -5,16 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>to_s (TextFile)</title>
8
+ <title>file_extension (TextFile)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/DOSFile.rb, line 37</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
15
- <span class="ruby-identifier">s</span>=<span class="ruby-value str">&quot;&quot;</span>
16
- <span class="ruby-ivar">@contents</span>.<span class="ruby-identifier">each_byte</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">b</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span><span class="ruby-operator">+=</span>(<span class="ruby-identifier">b</span><span class="ruby-operator">%</span><span class="ruby-value">0x80</span>).<span class="ruby-identifier">chr</span>.<span class="ruby-identifier">tr</span>(<span class="ruby-value">0x0</span><span class="ruby-constant">D</span>.<span class="ruby-identifier">chr</span>,<span class="ruby-value str">&quot;\n&quot;</span>)}
17
- <span class="ruby-identifier">s</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/DOSFile.rb, line 33</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">file_extension</span>
15
+ <span class="ruby-value str">&quot;.txt&quot;</span>
18
16
  <span class="ruby-keyword kw">end</span></pre>
19
17
  </body>
20
18
  </html>
@@ -0,0 +1,20 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>to_s (TextFile)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/DOSFile.rb, line 37</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
15
+ <span class="ruby-identifier">s</span>=<span class="ruby-value str">&quot;&quot;</span>
16
+ <span class="ruby-ivar">@contents</span>.<span class="ruby-identifier">each_byte</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">b</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span><span class="ruby-operator">+=</span>(<span class="ruby-identifier">b</span><span class="ruby-operator">%</span><span class="ruby-value">0x80</span>).<span class="ruby-identifier">chr</span>.<span class="ruby-identifier">tr</span>(<span class="ruby-value">0x0</span><span class="ruby-constant">D</span>.<span class="ruby-identifier">chr</span>,<span class="ruby-value str">&quot;\n&quot;</span>)}
17
+ <span class="ruby-identifier">s</span>
18
+ <span class="ruby-keyword kw">end</span></pre>
19
+ </body>
20
+ </html>