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.
- data/bin/dsktool.rb +14 -7
- data/doc/classes/AppleSoftFile.html +19 -18
- data/doc/classes/AppleSoftFile.src/M000011.html +4 -4
- data/doc/classes/AppleSoftFile.src/M000012.html +4 -4
- data/doc/classes/AppleSoftFile.src/M000013.html +18 -0
- data/doc/classes/AppleSoftFile.src/M000014.html +18 -0
- data/doc/classes/BinaryFile.html +19 -18
- data/doc/classes/BinaryFile.src/M000024.html +4 -4
- data/doc/classes/BinaryFile.src/M000025.html +4 -5
- data/doc/classes/BinaryFile.src/M000026.html +19 -0
- data/doc/classes/BinaryFile.src/M000029.html +18 -0
- data/doc/classes/BinaryFile.src/M000030.html +18 -0
- data/doc/classes/BinaryFile.src/M000031.html +19 -0
- data/doc/classes/D65.html +10 -10
- data/doc/classes/D65.src/M000009.html +4 -50
- data/doc/classes/D65.src/M000010.html +18 -0
- data/doc/classes/D65.src/M000011.html +64 -0
- data/doc/classes/DOSDisk.html +15 -15
- data/doc/classes/DOSDisk.src/M000014.html +6 -5
- data/doc/classes/DOSDisk.src/M000015.html +6 -62
- data/doc/classes/DOSDisk.src/M000016.html +19 -0
- data/doc/classes/DOSDisk.src/M000017.html +76 -0
- data/doc/classes/DOSFile.html +19 -18
- data/doc/classes/DOSFile.src/M000027.html +8 -3
- data/doc/classes/DOSFile.src/M000028.html +3 -4
- data/doc/classes/DOSFile.src/M000029.html +18 -0
- data/doc/classes/DOSFile.src/M000032.html +22 -0
- data/doc/classes/DOSFile.src/M000033.html +17 -0
- data/doc/classes/DOSFile.src/M000034.html +18 -0
- data/doc/classes/DSK.html +35 -35
- data/doc/classes/DSK.src/M000017.html +8 -8
- data/doc/classes/DSK.src/M000018.html +8 -13
- data/doc/classes/DSK.src/M000019.html +8 -5
- data/doc/classes/DSK.src/M000020.html +20 -4
- data/doc/classes/DSK.src/M000021.html +4 -25
- data/doc/classes/DSK.src/M000022.html +4 -9
- data/doc/classes/DSK.src/M000023.html +40 -0
- data/doc/classes/DSK.src/M000024.html +23 -0
- data/doc/classes/IntegerBasicFile.html +19 -18
- data/doc/classes/IntegerBasicFile.src/M000005.html +4 -4
- data/doc/classes/IntegerBasicFile.src/M000006.html +4 -4
- data/doc/classes/IntegerBasicFile.src/M000007.html +18 -0
- data/doc/classes/IntegerBasicFile.src/M000008.html +18 -0
- data/doc/classes/RDoc.html +5 -5
- data/doc/classes/RDoc.src/M000033.html +40 -0
- data/doc/classes/RDoc.src/M000038.html +40 -0
- data/doc/classes/SCAsmFile.html +226 -0
- data/doc/classes/SCAsmFile.src/M000025.html +18 -0
- data/doc/classes/SCAsmFile.src/M000026.html +18 -0
- data/doc/classes/SCAsmFile.src/M000027.html +18 -0
- data/doc/classes/SCAsmFile.src/M000028.html +36 -0
- data/doc/classes/TestDOSDisks.html +31 -1
- data/doc/classes/TestDOSDisks.src/M000003.html +3 -21
- data/doc/classes/TestDOSDisks.src/M000004.html +41 -0
- data/doc/classes/TestDOSDisks.src/M000005.html +27 -0
- data/doc/classes/TestDisassembly.html +5 -5
- data/doc/classes/TestDisassembly.src/M000008.html +19 -0
- data/doc/classes/TestDisassembly.src/M000009.html +19 -0
- data/doc/classes/TextFile.html +19 -18
- data/doc/classes/TextFile.src/M000030.html +4 -4
- data/doc/classes/TextFile.src/M000031.html +4 -6
- data/doc/classes/TextFile.src/M000032.html +20 -0
- data/doc/classes/TextFile.src/M000035.html +18 -0
- data/doc/classes/TextFile.src/M000036.html +18 -0
- data/doc/classes/TextFile.src/M000037.html +20 -0
- data/doc/created.rid +1 -1
- data/doc/dot/f_3.dot +13 -0
- data/doc/dot/f_3.png +0 -0
- data/doc/files/bin/dsktool_rb.html +32 -22
- data/doc/files/lib/DOSDisk_rb.html +1 -1
- data/doc/files/lib/DOSFile_rb.html +5 -4
- data/doc/files/lib/DSK_rb.html +3 -1
- data/doc/files/test/tc_dos_disks_rb.html +1 -1
- data/doc/fr_class_index.html +1 -0
- data/doc/fr_method_index.html +36 -30
- data/lib/CHANGES.txt +5 -0
- data/lib/DOSDisk.rb +1 -1
- data/lib/DOSFile.rb +91 -0
- data/lib/DSK.rb +10 -2
- data/test/AAL_1.DSK +0 -0
- data/test/tc_dos_disks.rb +25 -3
- 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">"I"</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">".asm"</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">""</span>
|
|
18
|
+
<span class="ruby-keyword kw">while</span> (<span class="ruby-identifier">index</span><span class="ruby-operator"><</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 "line number" 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">></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>
|
|
97
97
|
<a href="#M000002">test_empty_dsk</a>
|
|
98
|
-
<a href="#M000003">
|
|
98
|
+
<a href="#M000003">test_open_url_to_compressed_dsk</a>
|
|
99
|
+
<a href="#M000005">test_scasm_file</a>
|
|
100
|
+
<a href="#M000004">test_simple_dos_dsk</a>
|
|
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>
|
|
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">
|
|
15
|
-
<span class="ruby-identifier">dskname</span>=<span class="ruby-
|
|
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">"http://www.apple2.org.za/mirrors/ftp.apple.asimov.net/images/games/adventure/vaults_of_zurich.dsk.gz"</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">"#{dskname} should be DOS 3.3 format"</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">></span><span class="ruby-value">0</span>,<span class="ruby-node">"#{dskname} should have at least one file"</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">"HELLO"</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">"#{dskname} should have a file called HELLO"</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">"HELLO should be an AppleSoft file"</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">></span><span class="ruby-value">0</span>,<span class="ruby-value str">"HELLO should have non-zero length"</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">"10 REM"</span>,<span class="ruby-value str">"HELLO should start '10 REM'"</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">"MUFFIN"</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">"#{dskname} should have a file called MUFFIN"</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">"HELLO should be an Binary file"</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">></span><span class="ruby-value">0</span>,<span class="ruby-value str">"MUFFIN should have non-zero length"</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">></span><span class="ruby-value">0</span>,<span class="ruby-value str">"MUFFIN disassembly should have non-zero length"</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">"0803:"</span>,<span class="ruby-value str">"MUFFIN disassembly should start at $803"</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">"APPLESOFT"</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">"#{dskname} should have a file called APPLESOFT"</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">"HELLO should be an IntegetBasic file"</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">></span><span class="ruby-value">0</span>,<span class="ruby-value str">"APPLESOFT should have non-zero length"</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">"10 REM"</span>,<span class="ruby-value str">"APPLESOFT should start '10 REM'"</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">"//dos33_with_adt.dsk"</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">"#{dskname} should be DOS 3.3 format"</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">></span><span class="ruby-value">0</span>,<span class="ruby-node">"#{dskname} should have at least one file"</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">"HELLO"</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">"#{dskname} should have a file called HELLO"</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">"HELLO should be an AppleSoft file"</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">></span><span class="ruby-value">0</span>,<span class="ruby-value str">"HELLO should have non-zero length"</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">"10 REM"</span>,<span class="ruby-value str">"HELLO should start '10 REM'"</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">"MUFFIN"</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">"#{dskname} should have a file called MUFFIN"</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">"HELLO should be an Binary file"</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">></span><span class="ruby-value">0</span>,<span class="ruby-value str">"MUFFIN should have non-zero length"</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">></span><span class="ruby-value">0</span>,<span class="ruby-value str">"MUFFIN disassembly should have non-zero length"</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">"0803:"</span>,<span class="ruby-value str">"MUFFIN disassembly should start at $803"</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">"APPLESOFT"</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">"#{dskname} should have a file called APPLESOFT"</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">"HELLO should be an IntegetBasic file"</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">></span><span class="ruby-value">0</span>,<span class="ruby-value str">"APPLESOFT should have non-zero length"</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">"10 REM"</span>,<span class="ruby-value str">"APPLESOFT should start '10 REM'"</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">"//AAL_1.DSK"</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">"#{dskname} should be DOS 3.3 format"</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">></span><span class="ruby-value">0</span>,<span class="ruby-node">"#{dskname} should have at least one file"</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">"MORSE CODE"</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">"#{dskname} should have a file called MORSE CODE"</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">"MORSE CODE should be an SCasm file"</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">></span><span class="ruby-value">0</span>,<span class="ruby-value str">"MORSE CODE should have non-zero length"</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">"MORSE CODE should start '930 .LIST OFF'"</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="#
|
|
96
|
+
<a href="#M000009">test_simple</a>
|
|
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-
|
|
119
|
-
<a name="
|
|
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/
|
|
123
|
-
onclick="popupCode('TestDisassembly.src/
|
|
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">"\x60"</span>)),<span class="ruby-value str">"disassembly of 0x60 should be RTS"</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">"\x60"</span>)),<span class="ruby-value str">"disassembly of 0x60 should be RTS"</span>)
|
|
16
|
+
|
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
data/doc/classes/TextFile.html
CHANGED
|
@@ -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,
|
|
87
|
-
<area shape="RECT" coords="
|
|
88
|
-
<area shape="RECT" coords="
|
|
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="#
|
|
102
|
-
<a href="#
|
|
103
|
-
<a href="#
|
|
102
|
+
<a href="#M000036">file_extension</a>
|
|
103
|
+
<a href="#M000035">file_type</a>
|
|
104
|
+
<a href="#M000037">to_s</a>
|
|
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-
|
|
126
|
-
<a name="
|
|
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/
|
|
130
|
-
onclick="popupCode('TextFile.src/
|
|
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-
|
|
140
|
-
<a name="
|
|
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/
|
|
144
|
-
onclick="popupCode('TextFile.src/
|
|
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-
|
|
154
|
-
<a name="
|
|
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/
|
|
158
|
-
onclick="popupCode('TextFile.src/
|
|
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>
|
|
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
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
|
15
|
-
<span class="ruby-value str">"
|
|
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">"T"</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>
|
|
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
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
|
15
|
-
<span class="ruby-
|
|
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">"\n"</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">".txt"</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">""</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">"\n"</span>)}
|
|
17
|
+
<span class="ruby-identifier">s</span>
|
|
18
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
19
|
+
</body>
|
|
20
|
+
</html>
|