-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathreadme.html
136 lines (104 loc) · 5.1 KB
/
readme.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html40/strict.dtd">
<html><head>
<title>Minsk-2 Emulator</title>
<link rel=stylesheet title=Default href="minsk.css" type="text/css" media=all>
</head><body>
<h1>Minsk-2/Minsk-22 Emulator</h1>
<p id=top>(see it <a href='.'>in action</a>)
<h2>Introduction</h2>
<p>This is an emulator of the Минск-2 (Minsk-2) and Минск-22 (Minsk-22) –
mainframe computers from the Soviet era, produced around 1963 and 1965 respectively,
in the Byelorussian SSR.
<p>The Minsk-2 emulator was originally written for a task in the
<a href='http://www.podrate.cz/'>Po drátě</a> hacking contest (sorry, the page is in
Czech only). The participants were to find a password hidden in the machine's memory,
which involved figuring out how the machine works and reconstructing at least a part
of its instruction set.
You can try your luck, the password is still there.
<p>Online resources about these machines are rather scarce. English Wikipedia contains
a fairly short article on the <a href='http://en.wikipedia.org/wiki/Minsk_family_of_computers'>Minsk
family of computers</a>, Russian Wikipedia reveals a couple of technical details on
<a href='http://ru.wikipedia.org/wiki/%D0%9C%D0%B8%D0%BD%D1%81%D0%BA-22'>Minsk-22</a>,
which is essentially Minsk-2 with extra memory. The Russian Virtual Computer Museum
tells the <a href='http://www.computer-museum.ru/english/minsk0.htm'>history of the
Minsk family</a> in its full glory, but it lacks details. The best resource we could
find is the book Programmirovanije dlja ECBM Minsk-22 by V. M. Salikov, and the emulator
is based solely on that plus a bit of guesswork.
<p>We have written a <a href='INSTRUCTIONS'>brief description of the instruction set</a>
for our own reference.
<p>When using the emulator, please make sure that your browser is able to display
Cyrillic letters, as all error messages are printed in Russian. (This is not historically
accurate, the real machine never printed error messages – it used signal lights on the
control panel instead.)
<h2>Features</h2>
<p>We have tried to get as close to the behavior of the real machines as we could,
but the description in the Salikov's book is not as detailed as we would wish,
so several things remained to be guessed. Here is a list of likely differences
against the real Minsk-2/Minsk-22:
<ul>
<li>Rounding of fixed-point and floating-point computations is likely to be different.
<li>Arithmetic overflow is always fatal.
<li>Exact behavior of negative zero is unknown. We always produce positive zero as a result.
<li>Contents of the R1 and R2 registers displayed when the program stops probably
differ from the real front panel. However, the behavior visible to the program
should be correct.
<li>Among the rich set of I/O devices, only the line printer is implemented.
<li>Malformed instructions are probably handled differently.
</ul>
<h2>Input format</h2>
<p>The input to the emulator follows a fairly simple format:
<pre id=output><code>; An example
@0050
-62 00 7000 1000
-62 00 7006 1001
-62 00 7400 0000
-00 00 0000 0000
@1000
+65 45 53 53 56 17
+42 56 60 53 44 16
</code></pre>
<p>Empty lines and lines starting with a semicolon are ignored.
<code>@xxxx</code> sets the memory address (in octal), all other
lines specify signed 36-bit octal values to be written to consecutive
memory cells. Spaces inside numbers are purely decorative and the parser
ignores them.
<h2>Examples</h2>
<p>Here is a couple of easy example programs for you to try:
<ul>
<li><a href='.?example=hello'>Hello, world #1</a>
<li><a href='.?example=hello2'>Hello, world #2</a>
<li><a href='.?example=arith'>Aritmetics</a>
<li><a href='.?example=loop'>A simple loop</a>
</ul>
<h2>Author and copyright</h2>
<p>The Minsk-2 emulator has been written by <a href='http://mj.ucw.cz/'>Martin Mareš</a>
in 2010 and it is copyrighted by its author.
<p>Minsk-22 emulation and some other changes were added by
<a href='https://www.linkedin.com/in/rutgervanbergen/'>Rutger van Bergen</a> in
2021/2022.
<p>The program is free software. You can freely use it and distribute it under the terms of the
<a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU General Public License version 2</a>.
<p>Bug reports and suggestions are welcome (especially from people who have encountered
the real Minsk), please contact the author by e-mail at <a href='mailto:[email protected]'>[email protected]</a>.
<h2>Download</h2>
<p>You can download the <a href='http://mj.ucw.cz/download/minsk/'>source code of the emulator</a>.
<h2>Build</h2>
<p>The emulator has been developed on Linux with GCC and it should build and run on all POSIX systems,
possibly requiring trivial modifications.
<p>On a system with the GNU toolchain installed, the emulator can be built by running the following
command:
<pre>
$ make
</pre>
<h2><a id="use">Use</a></h2>
<p>The emulator reads its input from stdin. Loading and executing the ex-hello example program
would therefore be done like this:
<pre>
$ ./minsk < ex-hello
</pre>
<p>The list of supported options can be acquired by running the emulator with any
unsupported option:
<pre>
$ ./minsk -h
</pre>
</body></html>