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,40 @@
|
|
|
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>dump_sector (DSK)</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/DSK.rb, line 62</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dump_sector</span>(<span class="ruby-identifier">track</span>,<span class="ruby-identifier">sector</span>)
|
|
15
|
+
|
|
16
|
+
<span class="ruby-identifier">start_byte</span>=<span class="ruby-identifier">track</span><span class="ruby-operator">*</span><span class="ruby-value">16</span><span class="ruby-operator">*</span><span class="ruby-value">256</span><span class="ruby-operator">+</span><span class="ruby-identifier">sector</span><span class="ruby-operator">*</span><span class="ruby-value">256</span>
|
|
17
|
+
<span class="ruby-identifier">s</span>=<span class="ruby-ivar">@file_bytes</span>[<span class="ruby-identifier">start_byte</span><span class="ruby-operator">..</span><span class="ruby-identifier">start_byte</span><span class="ruby-operator">+</span><span class="ruby-value">255</span>]
|
|
18
|
+
|
|
19
|
+
<span class="ruby-identifier">print_hline</span>
|
|
20
|
+
<span class="ruby-identifier">printf</span>(<span class="ruby-value str">"TRACK: $%02X SECTOR $%02X\ OFFSET $%04X\n"</span>,<span class="ruby-identifier">track</span>,<span class="ruby-identifier">sector</span>,<span class="ruby-identifier">start_byte</span>)
|
|
21
|
+
<span class="ruby-identifier">printf</span> <span class="ruby-value str">"\t"</span>
|
|
22
|
+
|
|
23
|
+
(<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">15</span>).<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">printf</span>(<span class="ruby-value str">"%02X "</span>,<span class="ruby-identifier">x</span>) }
|
|
24
|
+
<span class="ruby-identifier">puts</span>
|
|
25
|
+
<span class="ruby-identifier">print_hline</span>
|
|
26
|
+
(<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">15</span>).<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">line_number</span><span class="ruby-operator">|</span>
|
|
27
|
+
<span class="ruby-identifier">lhs</span>=<span class="ruby-value str">""</span>
|
|
28
|
+
<span class="ruby-identifier">rhs</span>=<span class="ruby-value str">""</span>
|
|
29
|
+
<span class="ruby-identifier">start_byte</span>=<span class="ruby-identifier">line_number</span><span class="ruby-operator">*</span><span class="ruby-value">16</span>
|
|
30
|
+
<span class="ruby-identifier">line</span>=<span class="ruby-identifier">s</span>[<span class="ruby-identifier">start_byte</span><span class="ruby-operator">..</span><span class="ruby-identifier">start_byte</span><span class="ruby-operator">+</span><span class="ruby-value">15</span>]
|
|
31
|
+
<span class="ruby-identifier">line</span>.<span class="ruby-identifier">each_byte</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">byte</span><span class="ruby-operator">|</span>
|
|
32
|
+
<span class="ruby-identifier">lhs</span><span class="ruby-operator">+=</span> <span class="ruby-identifier">sprintf</span>(<span class="ruby-value str">"%02X "</span>, <span class="ruby-identifier">byte</span>)
|
|
33
|
+
<span class="ruby-identifier">rhs</span><span class="ruby-operator">+=</span> (<span class="ruby-identifier">byte</span><span class="ruby-operator">%</span><span class="ruby-value">128</span>).<span class="ruby-identifier">chr</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">/[\x00-\x1f]/</span>,<span class="ruby-value str">'.'</span>)
|
|
34
|
+
}
|
|
35
|
+
<span class="ruby-identifier">printf</span>(<span class="ruby-value str">"%02X\t%s %s\n"</span>,<span class="ruby-identifier">start_byte</span>,<span class="ruby-identifier">lhs</span>,<span class="ruby-identifier">rhs</span>)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
39
|
+
</body>
|
|
40
|
+
</html>
|
|
@@ -0,0 +1,23 @@
|
|
|
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>dump_disk (DSK)</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/DSK.rb, line 89</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dump_disk</span>
|
|
15
|
+
|
|
16
|
+
(<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">34</span>).<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">track</span><span class="ruby-operator">|</span>
|
|
17
|
+
(<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">15</span>).<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">sector</span><span class="ruby-operator">|</span>
|
|
18
|
+
<span class="ruby-identifier">dump_sector</span>(<span class="ruby-identifier">track</span>,<span class="ruby-identifier">sector</span>)
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
22
|
+
</body>
|
|
23
|
+
</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,
|
|
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>
|
|
@@ -154,9 +155,9 @@ Integer Basic file format:
|
|
|
154
155
|
<h3 class="section-bar">Methods</h3>
|
|
155
156
|
|
|
156
157
|
<div class="name-list">
|
|
157
|
-
<a href="#
|
|
158
|
-
<a href="#
|
|
159
|
-
<a href="#
|
|
158
|
+
<a href="#M000007">file_extension</a>
|
|
159
|
+
<a href="#M000006">file_type</a>
|
|
160
|
+
<a href="#M000008">to_s</a>
|
|
160
161
|
</div>
|
|
161
162
|
</div>
|
|
162
163
|
|
|
@@ -216,12 +217,12 @@ Integer Basic file format:
|
|
|
216
217
|
<div id="methods">
|
|
217
218
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
218
219
|
|
|
219
|
-
<div id="method-
|
|
220
|
-
<a name="
|
|
220
|
+
<div id="method-M000007" class="method-detail">
|
|
221
|
+
<a name="M000007"></a>
|
|
221
222
|
|
|
222
223
|
<div class="method-heading">
|
|
223
|
-
<a href="IntegerBasicFile.src/
|
|
224
|
-
onclick="popupCode('IntegerBasicFile.src/
|
|
224
|
+
<a href="IntegerBasicFile.src/M000007.html" target="Code" class="method-signature"
|
|
225
|
+
onclick="popupCode('IntegerBasicFile.src/M000007.html');return false;">
|
|
225
226
|
<span class="method-name">file_extension</span><span class="method-args">()</span>
|
|
226
227
|
</a>
|
|
227
228
|
</div>
|
|
@@ -230,12 +231,12 @@ Integer Basic file format:
|
|
|
230
231
|
</div>
|
|
231
232
|
</div>
|
|
232
233
|
|
|
233
|
-
<div id="method-
|
|
234
|
-
<a name="
|
|
234
|
+
<div id="method-M000006" class="method-detail">
|
|
235
|
+
<a name="M000006"></a>
|
|
235
236
|
|
|
236
237
|
<div class="method-heading">
|
|
237
|
-
<a href="IntegerBasicFile.src/
|
|
238
|
-
onclick="popupCode('IntegerBasicFile.src/
|
|
238
|
+
<a href="IntegerBasicFile.src/M000006.html" target="Code" class="method-signature"
|
|
239
|
+
onclick="popupCode('IntegerBasicFile.src/M000006.html');return false;">
|
|
239
240
|
<span class="method-name">file_type</span><span class="method-args">()</span>
|
|
240
241
|
</a>
|
|
241
242
|
</div>
|
|
@@ -244,12 +245,12 @@ Integer Basic file format:
|
|
|
244
245
|
</div>
|
|
245
246
|
</div>
|
|
246
247
|
|
|
247
|
-
<div id="method-
|
|
248
|
-
<a name="
|
|
248
|
+
<div id="method-M000008" class="method-detail">
|
|
249
|
+
<a name="M000008"></a>
|
|
249
250
|
|
|
250
251
|
<div class="method-heading">
|
|
251
|
-
<a href="IntegerBasicFile.src/
|
|
252
|
-
onclick="popupCode('IntegerBasicFile.src/
|
|
252
|
+
<a href="IntegerBasicFile.src/M000008.html" target="Code" class="method-signature"
|
|
253
|
+
onclick="popupCode('IntegerBasicFile.src/M000008.html');return false;">
|
|
253
254
|
<span class="method-name">to_s</span><span class="method-args">()</span>
|
|
254
255
|
</a>
|
|
255
256
|
</div>
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
<html>
|
|
7
7
|
<head>
|
|
8
|
-
<title>
|
|
8
|
+
<title>file_type (IntegerBasicFile)</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 107</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
16
|
<span class="ruby-keyword kw">end</span></pre>
|
|
17
17
|
</body>
|
|
18
18
|
</html>
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
<html>
|
|
7
7
|
<head>
|
|
8
|
-
<title>
|
|
8
|
+
<title>file_type (IntegerBasicFile)</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-
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/DOSFile.rb, line 107</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
16
|
<span class="ruby-keyword kw">end</span></pre>
|
|
17
17
|
</body>
|
|
18
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 (IntegerBasicFile)</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 111</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">file_extension</span>
|
|
15
|
+
<span class="ruby-value str">".bas"</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 (IntegerBasicFile)</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 116</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
|
15
|
+
<span class="ruby-identifier">buffer_as_integer_basic_file</span>(<span class="ruby-ivar">@contents</span>)
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
data/doc/classes/RDoc.html
CHANGED
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
<h3 class="section-bar">Methods</h3>
|
|
83
83
|
|
|
84
84
|
<div class="name-list">
|
|
85
|
-
<a href="#
|
|
85
|
+
<a href="#M000038">usage_from_file</a>
|
|
86
86
|
</div>
|
|
87
87
|
</div>
|
|
88
88
|
|
|
@@ -104,12 +104,12 @@
|
|
|
104
104
|
<div id="methods">
|
|
105
105
|
<h3 class="section-bar">Public Class methods</h3>
|
|
106
106
|
|
|
107
|
-
<div id="method-
|
|
108
|
-
<a name="
|
|
107
|
+
<div id="method-M000038" class="method-detail">
|
|
108
|
+
<a name="M000038"></a>
|
|
109
109
|
|
|
110
110
|
<div class="method-heading">
|
|
111
|
-
<a href="RDoc.src/
|
|
112
|
-
onclick="popupCode('RDoc.src/
|
|
111
|
+
<a href="RDoc.src/M000038.html" target="Code" class="method-signature"
|
|
112
|
+
onclick="popupCode('RDoc.src/M000038.html');return false;">
|
|
113
113
|
<span class="method-name">usage_from_file</span><span class="method-args">(input_file, *args)</span>
|
|
114
114
|
</a>
|
|
115
115
|
</div>
|
|
@@ -0,0 +1,40 @@
|
|
|
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>usage_from_file (RDoc)</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 bin/dsktool.rb, line 37</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">RDoc</span>.<span class="ruby-identifier">usage_from_file</span>(<span class="ruby-identifier">input_file</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
|
15
|
+
<span class="ruby-identifier">comment</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">input_file</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
|
|
16
|
+
<span class="ruby-constant">RDoc</span>.<span class="ruby-identifier">find_comment</span>(<span class="ruby-identifier">file</span>)
|
|
17
|
+
<span class="ruby-keyword kw">end</span>
|
|
18
|
+
<span class="ruby-identifier">comment</span> = <span class="ruby-identifier">comment</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/^\s*#/</span>, <span class="ruby-value str">''</span>)
|
|
19
|
+
|
|
20
|
+
<span class="ruby-identifier">markup</span> = <span class="ruby-constant">SM</span><span class="ruby-operator">::</span><span class="ruby-constant">SimpleMarkup</span>.<span class="ruby-identifier">new</span>
|
|
21
|
+
<span class="ruby-identifier">flow_convertor</span> = <span class="ruby-constant">SM</span><span class="ruby-operator">::</span><span class="ruby-constant">ToFlow</span>.<span class="ruby-identifier">new</span>
|
|
22
|
+
|
|
23
|
+
<span class="ruby-identifier">flow</span> = <span class="ruby-identifier">markup</span>.<span class="ruby-identifier">convert</span>(<span class="ruby-identifier">comment</span>, <span class="ruby-identifier">flow_convertor</span>)
|
|
24
|
+
|
|
25
|
+
<span class="ruby-identifier">format</span> = <span class="ruby-value str">"plain"</span>
|
|
26
|
+
|
|
27
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">empty?</span>
|
|
28
|
+
<span class="ruby-identifier">flow</span> = <span class="ruby-identifier">extract_sections</span>(<span class="ruby-identifier">flow</span>, <span class="ruby-identifier">args</span>)
|
|
29
|
+
<span class="ruby-keyword kw">end</span>
|
|
30
|
+
|
|
31
|
+
<span class="ruby-identifier">options</span> = <span class="ruby-constant">RI</span><span class="ruby-operator">::</span><span class="ruby-constant">Options</span>.<span class="ruby-identifier">instance</span>
|
|
32
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span> = <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"RI"</span>]
|
|
33
|
+
<span class="ruby-identifier">options</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">args</span>.<span class="ruby-identifier">split</span>)
|
|
34
|
+
<span class="ruby-keyword kw">end</span>
|
|
35
|
+
<span class="ruby-identifier">formatter</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">formatter</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">options</span>, <span class="ruby-value str">""</span>)
|
|
36
|
+
<span class="ruby-identifier">formatter</span>.<span class="ruby-identifier">display_flow</span>(<span class="ruby-identifier">flow</span>)
|
|
37
|
+
<span class="ruby-identifier">exit</span>
|
|
38
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
39
|
+
</body>
|
|
40
|
+
</html>
|
|
@@ -0,0 +1,40 @@
|
|
|
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>usage_from_file (RDoc)</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 bin/dsktool.rb, line 40</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">RDoc</span>.<span class="ruby-identifier">usage_from_file</span>(<span class="ruby-identifier">input_file</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
|
15
|
+
<span class="ruby-identifier">comment</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">input_file</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
|
|
16
|
+
<span class="ruby-constant">RDoc</span>.<span class="ruby-identifier">find_comment</span>(<span class="ruby-identifier">file</span>)
|
|
17
|
+
<span class="ruby-keyword kw">end</span>
|
|
18
|
+
<span class="ruby-identifier">comment</span> = <span class="ruby-identifier">comment</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/^\s*#/</span>, <span class="ruby-value str">''</span>)
|
|
19
|
+
|
|
20
|
+
<span class="ruby-identifier">markup</span> = <span class="ruby-constant">SM</span><span class="ruby-operator">::</span><span class="ruby-constant">SimpleMarkup</span>.<span class="ruby-identifier">new</span>
|
|
21
|
+
<span class="ruby-identifier">flow_convertor</span> = <span class="ruby-constant">SM</span><span class="ruby-operator">::</span><span class="ruby-constant">ToFlow</span>.<span class="ruby-identifier">new</span>
|
|
22
|
+
|
|
23
|
+
<span class="ruby-identifier">flow</span> = <span class="ruby-identifier">markup</span>.<span class="ruby-identifier">convert</span>(<span class="ruby-identifier">comment</span>, <span class="ruby-identifier">flow_convertor</span>)
|
|
24
|
+
|
|
25
|
+
<span class="ruby-identifier">format</span> = <span class="ruby-value str">"plain"</span>
|
|
26
|
+
|
|
27
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">empty?</span>
|
|
28
|
+
<span class="ruby-identifier">flow</span> = <span class="ruby-identifier">extract_sections</span>(<span class="ruby-identifier">flow</span>, <span class="ruby-identifier">args</span>)
|
|
29
|
+
<span class="ruby-keyword kw">end</span>
|
|
30
|
+
|
|
31
|
+
<span class="ruby-identifier">options</span> = <span class="ruby-constant">RI</span><span class="ruby-operator">::</span><span class="ruby-constant">Options</span>.<span class="ruby-identifier">instance</span>
|
|
32
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span> = <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"RI"</span>]
|
|
33
|
+
<span class="ruby-identifier">options</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">args</span>.<span class="ruby-identifier">split</span>)
|
|
34
|
+
<span class="ruby-keyword kw">end</span>
|
|
35
|
+
<span class="ruby-identifier">formatter</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">formatter</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">options</span>, <span class="ruby-value str">""</span>)
|
|
36
|
+
<span class="ruby-identifier">formatter</span>.<span class="ruby-identifier">display_flow</span>(<span class="ruby-identifier">flow</span>)
|
|
37
|
+
<span class="ruby-identifier">exit</span>
|
|
38
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
39
|
+
</body>
|
|
40
|
+
</html>
|
|
@@ -0,0 +1,226 @@
|
|
|
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 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
|
+
<head>
|
|
8
|
+
<title>Class: SCAsmFile</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
|
12
|
+
<script type="text/javascript">
|
|
13
|
+
// <![CDATA[
|
|
14
|
+
|
|
15
|
+
function popupCode( url ) {
|
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function toggleCode( id ) {
|
|
20
|
+
if ( document.getElementById )
|
|
21
|
+
elem = document.getElementById( id );
|
|
22
|
+
else if ( document.all )
|
|
23
|
+
elem = eval( "document.all." + id );
|
|
24
|
+
else
|
|
25
|
+
return false;
|
|
26
|
+
|
|
27
|
+
elemStyle = elem.style;
|
|
28
|
+
|
|
29
|
+
if ( elemStyle.display != "block" ) {
|
|
30
|
+
elemStyle.display = "block"
|
|
31
|
+
} else {
|
|
32
|
+
elemStyle.display = "none"
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Make codeblocks hidden by default
|
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
|
40
|
+
|
|
41
|
+
// ]]>
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
</head>
|
|
45
|
+
<body>
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
<div id="classHeader">
|
|
50
|
+
<table class="header-table">
|
|
51
|
+
<tr class="top-aligned-row">
|
|
52
|
+
<td><strong>Class</strong></td>
|
|
53
|
+
<td class="class-name-in-header">SCAsmFile</td>
|
|
54
|
+
</tr>
|
|
55
|
+
<tr class="top-aligned-row">
|
|
56
|
+
<td><strong>In:</strong></td>
|
|
57
|
+
<td>
|
|
58
|
+
<a href="../files/lib/DOSFile_rb.html">
|
|
59
|
+
lib/DOSFile.rb
|
|
60
|
+
</a>
|
|
61
|
+
<br />
|
|
62
|
+
</td>
|
|
63
|
+
</tr>
|
|
64
|
+
|
|
65
|
+
<tr class="top-aligned-row">
|
|
66
|
+
<td><strong>Parent:</strong></td>
|
|
67
|
+
<td>
|
|
68
|
+
<a href="DOSFile.html">
|
|
69
|
+
DOSFile
|
|
70
|
+
</a>
|
|
71
|
+
</td>
|
|
72
|
+
</tr>
|
|
73
|
+
</table>
|
|
74
|
+
</div>
|
|
75
|
+
<!-- banner header -->
|
|
76
|
+
|
|
77
|
+
<div id="bodyContent">
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
<div id="contextContent">
|
|
82
|
+
<div id="diagram">
|
|
83
|
+
<map id="map" name="map">
|
|
84
|
+
<area shape="RECT" coords="5,101,109,149" href="IntegerBasicFile.html" alt="IntegerBasicFile">
|
|
85
|
+
<area shape="RECT" coords="133,101,227,149" href="AppleSoftFile.html" alt="AppleSoftFile">
|
|
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">
|
|
90
|
+
</map>
|
|
91
|
+
<img src="../dot/f_3.png" usemap="#map" border=0 alt="TopLevel">
|
|
92
|
+
</div>
|
|
93
|
+
|
|
94
|
+
<div id="description">
|
|
95
|
+
<p>
|
|
96
|
+
Adapted from FID.C — a utility to browse Apple II .<a
|
|
97
|
+
href="DSK.html">DSK</a> image files by Paul Schlyter (pausch@saaf.se)
|
|
98
|
+
</p>
|
|
99
|
+
<pre>
|
|
100
|
+
S-C Assembler file format:
|
|
101
|
+
|
|
102
|
+
<Length_of_file> (16-bit little endian)
|
|
103
|
+
<Line>
|
|
104
|
+
......
|
|
105
|
+
<Line>
|
|
106
|
+
|
|
107
|
+
where <Line> is:
|
|
108
|
+
<Length> (8-bit: including length byte, line no, contents, zero>
|
|
109
|
+
<Line no> (16-bit little endian: 0-65535)
|
|
110
|
+
<Characters>
|
|
111
|
+
<Zero byte> ($00, to mark the end of the S-C Asm source line)
|
|
112
|
+
|
|
113
|
+
where <Characters> are an arbitrary sequence of:
|
|
114
|
+
<Literal character>: $20 to $7E - literal characters
|
|
115
|
+
<Compressed spaces>: $80 to $BF - represents 1 to 63 spaces
|
|
116
|
+
<Compressed repetition>: $C0 <n> <ch> - represents <ch> n times
|
|
117
|
+
</pre>
|
|
118
|
+
|
|
119
|
+
</div>
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
</div>
|
|
123
|
+
|
|
124
|
+
<div id="method-list">
|
|
125
|
+
<h3 class="section-bar">Methods</h3>
|
|
126
|
+
|
|
127
|
+
<div class="name-list">
|
|
128
|
+
<a href="#M000028">can_be_scasm_file</a>
|
|
129
|
+
<a href="#M000027">file_extension</a>
|
|
130
|
+
<a href="#M000025">file_type</a>
|
|
131
|
+
<a href="#M000026">to_s</a>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
</div>
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
<!-- if includes -->
|
|
139
|
+
|
|
140
|
+
<div id="section">
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
<!-- if method_list -->
|
|
150
|
+
<div id="methods">
|
|
151
|
+
<h3 class="section-bar">Public Class methods</h3>
|
|
152
|
+
|
|
153
|
+
<div id="method-M000028" class="method-detail">
|
|
154
|
+
<a name="M000028"></a>
|
|
155
|
+
|
|
156
|
+
<div class="method-heading">
|
|
157
|
+
<a href="SCAsmFile.src/M000028.html" target="Code" class="method-signature"
|
|
158
|
+
onclick="popupCode('SCAsmFile.src/M000028.html');return false;">
|
|
159
|
+
<span class="method-name">can_be_scasm_file</span><span class="method-args">(buffer)</span>
|
|
160
|
+
</a>
|
|
161
|
+
</div>
|
|
162
|
+
|
|
163
|
+
<div class="method-description">
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
|
|
167
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
|
168
|
+
|
|
169
|
+
<div id="method-M000027" class="method-detail">
|
|
170
|
+
<a name="M000027"></a>
|
|
171
|
+
|
|
172
|
+
<div class="method-heading">
|
|
173
|
+
<a href="SCAsmFile.src/M000027.html" target="Code" class="method-signature"
|
|
174
|
+
onclick="popupCode('SCAsmFile.src/M000027.html');return false;">
|
|
175
|
+
<span class="method-name">file_extension</span><span class="method-args">()</span>
|
|
176
|
+
</a>
|
|
177
|
+
</div>
|
|
178
|
+
|
|
179
|
+
<div class="method-description">
|
|
180
|
+
</div>
|
|
181
|
+
</div>
|
|
182
|
+
|
|
183
|
+
<div id="method-M000025" class="method-detail">
|
|
184
|
+
<a name="M000025"></a>
|
|
185
|
+
|
|
186
|
+
<div class="method-heading">
|
|
187
|
+
<a href="SCAsmFile.src/M000025.html" target="Code" class="method-signature"
|
|
188
|
+
onclick="popupCode('SCAsmFile.src/M000025.html');return false;">
|
|
189
|
+
<span class="method-name">file_type</span><span class="method-args">()</span>
|
|
190
|
+
</a>
|
|
191
|
+
</div>
|
|
192
|
+
|
|
193
|
+
<div class="method-description">
|
|
194
|
+
</div>
|
|
195
|
+
</div>
|
|
196
|
+
|
|
197
|
+
<div id="method-M000026" class="method-detail">
|
|
198
|
+
<a name="M000026"></a>
|
|
199
|
+
|
|
200
|
+
<div class="method-heading">
|
|
201
|
+
<a href="SCAsmFile.src/M000026.html" target="Code" class="method-signature"
|
|
202
|
+
onclick="popupCode('SCAsmFile.src/M000026.html');return false;">
|
|
203
|
+
<span class="method-name">to_s</span><span class="method-args">()</span>
|
|
204
|
+
</a>
|
|
205
|
+
</div>
|
|
206
|
+
|
|
207
|
+
<div class="method-description">
|
|
208
|
+
<p>
|
|
209
|
+
display file with all tokens expanded
|
|
210
|
+
</p>
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
</div>
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
</div>
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
<div id="validator-badges">
|
|
222
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
223
|
+
</div>
|
|
224
|
+
|
|
225
|
+
</body>
|
|
226
|
+
</html>
|