dsktool 0.1.1
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 +157 -0
- data/doc/classes/AppleSoftFile.html +215 -0
- data/doc/classes/AppleSoftFile.src/M000005.html +18 -0
- data/doc/classes/AppleSoftFile.src/M000006.html +18 -0
- data/doc/classes/AppleSoftFile.src/M000008.html +18 -0
- data/doc/classes/AppleSoftFile.src/M000009.html +18 -0
- data/doc/classes/AppleSoftFile.src/M000010.html +18 -0
- data/doc/classes/AppleSoftFile.src/M000011.html +18 -0
- data/doc/classes/AppleSoftFile.src/M000012.html +18 -0
- data/doc/classes/BinaryFile.html +179 -0
- data/doc/classes/BinaryFile.src/M000015.html +18 -0
- data/doc/classes/BinaryFile.src/M000020.html +18 -0
- data/doc/classes/BinaryFile.src/M000021.html +18 -0
- data/doc/classes/BinaryFile.src/M000022.html +19 -0
- data/doc/classes/BinaryFile.src/M000023.html +18 -0
- data/doc/classes/BinaryFile.src/M000024.html +18 -0
- data/doc/classes/BinaryFile.src/M000025.html +19 -0
- data/doc/classes/D65.html +180 -0
- data/doc/classes/D65.src/M000002.html +18 -0
- data/doc/classes/D65.src/M000003.html +18 -0
- data/doc/classes/D65.src/M000004.html +64 -0
- data/doc/classes/D65.src/M000005.html +18 -0
- data/doc/classes/D65.src/M000006.html +18 -0
- data/doc/classes/D65.src/M000007.html +18 -0
- data/doc/classes/D65.src/M000008.html +18 -0
- data/doc/classes/D65.src/M000009.html +64 -0
- data/doc/classes/DOSDisk.html +272 -0
- data/doc/classes/DOSDisk.src/M000007.html +20 -0
- data/doc/classes/DOSDisk.src/M000008.html +77 -0
- data/doc/classes/DOSDisk.src/M000010.html +20 -0
- data/doc/classes/DOSDisk.src/M000011.html +20 -0
- data/doc/classes/DOSDisk.src/M000012.html +19 -0
- data/doc/classes/DOSDisk.src/M000013.html +20 -0
- data/doc/classes/DOSDisk.src/M000014.html +19 -0
- data/doc/classes/DOSDisk.src/M000015.html +76 -0
- data/doc/classes/DOSFile.html +221 -0
- data/doc/classes/DOSFile.src/M000016.html +22 -0
- data/doc/classes/DOSFile.src/M000017.html +17 -0
- data/doc/classes/DOSFile.src/M000018.html +18 -0
- data/doc/classes/DOSFile.src/M000021.html +22 -0
- data/doc/classes/DOSFile.src/M000022.html +22 -0
- data/doc/classes/DOSFile.src/M000023.html +22 -0
- data/doc/classes/DOSFile.src/M000024.html +17 -0
- data/doc/classes/DOSFile.src/M000025.html +18 -0
- data/doc/classes/DOSFile.src/M000026.html +22 -0
- data/doc/classes/DOSFile.src/M000027.html +17 -0
- data/doc/classes/DOSFile.src/M000028.html +18 -0
- data/doc/classes/DSK.html +285 -0
- data/doc/classes/DSK.src/M000009.html +22 -0
- data/doc/classes/DSK.src/M000010.html +27 -0
- data/doc/classes/DSK.src/M000011.html +19 -0
- data/doc/classes/DSK.src/M000012.html +18 -0
- data/doc/classes/DSK.src/M000013.html +22 -0
- data/doc/classes/DSK.src/M000014.html +22 -0
- data/doc/classes/DSK.src/M000015.html +22 -0
- data/doc/classes/DSK.src/M000016.html +22 -0
- data/doc/classes/DSK.src/M000017.html +22 -0
- data/doc/classes/DSK.src/M000018.html +27 -0
- data/doc/classes/DSK.src/M000019.html +19 -0
- data/doc/classes/DSK.src/M000020.html +18 -0
- data/doc/classes/DSK.src/M000021.html +40 -0
- data/doc/classes/DSK.src/M000022.html +23 -0
- data/doc/classes/IntegerBasicFile.html +276 -0
- data/doc/classes/IntegerBasicFile.src/M000001.html +18 -0
- data/doc/classes/IntegerBasicFile.src/M000004.html +18 -0
- data/doc/classes/IntegerBasicFile.src/M000005.html +18 -0
- data/doc/classes/IntegerBasicFile.src/M000006.html +18 -0
- data/doc/classes/TestDOSDisks.html +174 -0
- data/doc/classes/TestDOSDisks.src/M000001.html +19 -0
- data/doc/classes/TestDOSDisks.src/M000002.html +19 -0
- data/doc/classes/TestDOSDisks.src/M000003.html +43 -0
- data/doc/classes/TestDisassembly.html +144 -0
- data/doc/classes/TestDisassembly.src/M000005.html +19 -0
- data/doc/classes/TestDisassembly.src/M000006.html +19 -0
- data/doc/classes/TestDisassembly.src/M000007.html +19 -0
- data/doc/classes/TextFile.html +179 -0
- data/doc/classes/TextFile.src/M000019.html +18 -0
- data/doc/classes/TextFile.src/M000020.html +20 -0
- data/doc/classes/TextFile.src/M000024.html +18 -0
- data/doc/classes/TextFile.src/M000025.html +18 -0
- data/doc/classes/TextFile.src/M000026.html +18 -0
- data/doc/classes/TextFile.src/M000027.html +20 -0
- data/doc/classes/TextFile.src/M000029.html +18 -0
- data/doc/classes/TextFile.src/M000030.html +18 -0
- data/doc/classes/TextFile.src/M000031.html +20 -0
- data/doc/created.rid +1 -0
- data/doc/dot/f_0.dot +14 -0
- data/doc/dot/f_0.png +0 -0
- data/doc/dot/f_1.dot +23 -0
- data/doc/dot/f_1.png +0 -0
- data/doc/dot/f_2.dot +32 -0
- data/doc/dot/f_2.png +0 -0
- data/doc/dot/f_3.dot +75 -0
- data/doc/dot/f_3.png +0 -0
- data/doc/dot/f_4.dot +23 -0
- data/doc/dot/f_4.png +0 -0
- data/doc/dot/f_5.dot +32 -0
- data/doc/dot/f_5.png +0 -0
- data/doc/dot/f_6.dot +32 -0
- data/doc/dot/f_6.png +0 -0
- data/doc/dot/f_7.dot +14 -0
- data/doc/dot/f_7.png +0 -0
- data/doc/files/bin/dsktool_rb.html +171 -0
- data/doc/files/lib/D65_rb.html +114 -0
- data/doc/files/lib/DOSDisk_rb.html +115 -0
- data/doc/files/lib/DOSFile_rb.html +118 -0
- data/doc/files/lib/DSK_rb.html +114 -0
- data/doc/files/test/tc_disassembly_rb.html +117 -0
- data/doc/files/test/tc_dos_disks_rb.html +116 -0
- data/doc/files/test/test_dos_disks_rb.html +109 -0
- data/doc/files/test/ts_test_all_rb.html +114 -0
- data/doc/fr_class_index.html +36 -0
- data/doc/fr_file_index.html +34 -0
- data/doc/fr_method_index.html +57 -0
- data/doc/index.html +24 -0
- data/lib/D65.rb +178 -0
- data/lib/DOSDisk.rb +186 -0
- data/lib/DOSFile.rb +356 -0
- data/lib/DSK.rb +121 -0
- data/lib/a2_symbols.yaml +199 -0
- data/test/dos33_with_adt.dsk +0 -0
- data/test/tc_disassembly.rb +16 -0
- data/test/tc_dos_disks.rb +49 -0
- data/test/ts_test_all.rb +5 -0
- metadata +184 -0
@@ -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 (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 44</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>file_type (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 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
|
+
<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 (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>
|
@@ -0,0 +1,174 @@
|
|
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: TestDOSDisks</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">TestDOSDisks</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/test/tc_dos_disks_rb.html">
|
59
|
+
test/tc_dos_disks.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
|
+
Test::Unit::TestCase
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
<div id="diagram">
|
81
|
+
<map id="map" name="map">
|
82
|
+
<area shape="RECT" coords="17,101,116,149" href="TestDOSDisks.html" alt="TestDOSDisks">
|
83
|
+
<area shape="RECT" coords="5,5,128,53" href="Test/Unit/TestCase.html" alt="Test::Unit::TestCase">
|
84
|
+
</map>
|
85
|
+
<img src="../dot/f_6.png" usemap="#map" border=0 alt="TopLevel">
|
86
|
+
</div>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
</div>
|
91
|
+
|
92
|
+
<div id="method-list">
|
93
|
+
<h3 class="section-bar">Methods</h3>
|
94
|
+
|
95
|
+
<div class="name-list">
|
96
|
+
<a href="#M000001">test_bad_dsks</a>
|
97
|
+
<a href="#M000002">test_empty_dsk</a>
|
98
|
+
<a href="#M000003">test_simple_dos_dsk</a>
|
99
|
+
</div>
|
100
|
+
</div>
|
101
|
+
|
102
|
+
</div>
|
103
|
+
|
104
|
+
|
105
|
+
<!-- if includes -->
|
106
|
+
|
107
|
+
<div id="section">
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
<!-- if method_list -->
|
117
|
+
<div id="methods">
|
118
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
119
|
+
|
120
|
+
<div id="method-M000001" class="method-detail">
|
121
|
+
<a name="M000001"></a>
|
122
|
+
|
123
|
+
<div class="method-heading">
|
124
|
+
<a href="TestDOSDisks.src/M000001.html" target="Code" class="method-signature"
|
125
|
+
onclick="popupCode('TestDOSDisks.src/M000001.html');return false;">
|
126
|
+
<span class="method-name">test_bad_dsks</span><span class="method-args">()</span>
|
127
|
+
</a>
|
128
|
+
</div>
|
129
|
+
|
130
|
+
<div class="method-description">
|
131
|
+
</div>
|
132
|
+
</div>
|
133
|
+
|
134
|
+
<div id="method-M000002" class="method-detail">
|
135
|
+
<a name="M000002"></a>
|
136
|
+
|
137
|
+
<div class="method-heading">
|
138
|
+
<a href="TestDOSDisks.src/M000002.html" target="Code" class="method-signature"
|
139
|
+
onclick="popupCode('TestDOSDisks.src/M000002.html');return false;">
|
140
|
+
<span class="method-name">test_empty_dsk</span><span class="method-args">()</span>
|
141
|
+
</a>
|
142
|
+
</div>
|
143
|
+
|
144
|
+
<div class="method-description">
|
145
|
+
</div>
|
146
|
+
</div>
|
147
|
+
|
148
|
+
<div id="method-M000003" class="method-detail">
|
149
|
+
<a name="M000003"></a>
|
150
|
+
|
151
|
+
<div class="method-heading">
|
152
|
+
<a href="TestDOSDisks.src/M000003.html" target="Code" class="method-signature"
|
153
|
+
onclick="popupCode('TestDOSDisks.src/M000003.html');return false;">
|
154
|
+
<span class="method-name">test_simple_dos_dsk</span><span class="method-args">()</span>
|
155
|
+
</a>
|
156
|
+
</div>
|
157
|
+
|
158
|
+
<div class="method-description">
|
159
|
+
</div>
|
160
|
+
</div>
|
161
|
+
|
162
|
+
|
163
|
+
</div>
|
164
|
+
|
165
|
+
|
166
|
+
</div>
|
167
|
+
|
168
|
+
|
169
|
+
<div id="validator-badges">
|
170
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
171
|
+
</div>
|
172
|
+
|
173
|
+
</body>
|
174
|
+
</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_bad_dsks (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 5</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_bad_dsks</span>
|
15
|
+
<span class="ruby-identifier">assert_raise</span>(<span class="ruby-constant">RuntimeError</span>,<span class="ruby-value str">"short file should throw an error"</span>) {<span class="ruby-identifier">dsk</span>=<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"0"</span><span class="ruby-operator">*</span><span class="ruby-value">100</span>)}
|
16
|
+
<span class="ruby-identifier">assert_raise</span>(<span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ENOENT</span>,<span class="ruby-value str">"non existant file should throw an error"</span>) {<span class="ruby-identifier">dsk</span>=<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">read</span>(<span class="ruby-value str">"NonExistantFileName.not"</span>)}
|
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_empty_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 11</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_empty_dsk</span>
|
15
|
+
<span class="ruby-identifier">dsk</span>=<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">new</span>()
|
16
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-operator">!</span><span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">is_dos33?</span>,<span class="ruby-value str">"empty DSK should not be DOS 3.3 format"</span>)
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
18
|
+
</body>
|
19
|
+
</html>
|
@@ -0,0 +1,43 @@
|
|
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 16</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-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
|
+
|
40
|
+
|
41
|
+
<span class="ruby-keyword kw">end</span></pre>
|
42
|
+
</body>
|
43
|
+
</html>
|
@@ -0,0 +1,144 @@
|
|
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: TestDisassembly</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">TestDisassembly</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/test/tc_disassembly_rb.html">
|
59
|
+
test/tc_disassembly.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
|
+
Test::Unit::TestCase
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
<div id="diagram">
|
81
|
+
<map id="map" name="map">
|
82
|
+
<area shape="RECT" coords="13,101,123,149" href="TestDisassembly.html" alt="TestDisassembly">
|
83
|
+
<area shape="RECT" coords="7,5,129,53" href="Test/Unit/TestCase.html" alt="Test::Unit::TestCase">
|
84
|
+
</map>
|
85
|
+
<img src="../dot/f_5.png" usemap="#map" border=0 alt="TopLevel">
|
86
|
+
</div>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
</div>
|
91
|
+
|
92
|
+
<div id="method-list">
|
93
|
+
<h3 class="section-bar">Methods</h3>
|
94
|
+
|
95
|
+
<div class="name-list">
|
96
|
+
<a href="#M000007">test_simple</a>
|
97
|
+
</div>
|
98
|
+
</div>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
|
103
|
+
<!-- if includes -->
|
104
|
+
|
105
|
+
<div id="section">
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
<!-- if method_list -->
|
115
|
+
<div id="methods">
|
116
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
117
|
+
|
118
|
+
<div id="method-M000007" class="method-detail">
|
119
|
+
<a name="M000007"></a>
|
120
|
+
|
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;">
|
124
|
+
<span class="method-name">test_simple</span><span class="method-args">()</span>
|
125
|
+
</a>
|
126
|
+
</div>
|
127
|
+
|
128
|
+
<div class="method-description">
|
129
|
+
</div>
|
130
|
+
</div>
|
131
|
+
|
132
|
+
|
133
|
+
</div>
|
134
|
+
|
135
|
+
|
136
|
+
</div>
|
137
|
+
|
138
|
+
|
139
|
+
<div id="validator-badges">
|
140
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
141
|
+
</div>
|
142
|
+
|
143
|
+
</body>
|
144
|
+
</html>
|