After reading the
article about the programmable micro-calculator on iOS, such an attack of nostalgia rolled over me that I climbed up to dig into the bookcase, and after a long search, I found an old notebook with notes on programming and independently developed games.
On the first page with a felt-tip pen, the website url on the people, which we made almost the whole court, proudly nakaryan. I will occasionally refer to it.
The beginning of the recordings is the basis of programming (the code was written for MK-61, but it will work on similar devices).
To switch to the appropriate mode, you need to press - Fprg, to exit - Favt.
')
The basic technique that I used when writing programs was working with registers.
To write to the register, use the button P → X, to output X → P. For example, the sequence of presses 72 P → X 1 writes the number 72 to the register RG1, and X → P 1 outputs the value from the register RG1 to the register X.
The contents of register X are always displayed on the screen - this is one of the stack registers (X, Y, Z, T). For work with stack registers commands are used:
- To ↑ (copies the contents of register X to Y, Y to Z, etc.).
- (changes the contents of the registers X and Y places)
- CX (erases the contents of register X)
I also actively used the if function — the Fx = 0, Fx = / 0, Fx <0, and Fx> 0 keys are responsible for this. Syntax:
Fx # 0 (step for the transition if the condition is not met) (subsequent command when the condition is met).
You can read more about syntax in
this article .
We turn to the most interesting. In those years and under those circumstances, none of my company had any devices on which to program - we spent hours at the calculator, and we really liked it. Like any children, we wanted to play, and noticed that the function "inv" (logical inversion) can convert numbers, for example, to the symbol "G". “E” or “C”, and if you display “8-EC” and turn the calculator clockwise, we will see something that looks like a little man.

The game, the code of which was painted in the notebook most beautifully, was called
“Lamer Andrew meets America” .
The instruction reads: “You can watch a cartoon (by pressing IN SP), shoot at a monster (BP 53), break the enemy's car (BP 74). If you die, you will see the symbols '8 *****', if you win - 'ECC'. In this game you can use several types at once - from the front and from the top. ” Uncomplicated.
The values ​​of the registers by the P command (for example, 80013 inv P 0) entered “animation”:
Register | Value for "normal appearance" | Value for "Advanced View" |
0 | 80013 inv | 80013 inv |
one | 8 inv | 8 inv |
2 | 81 inv | 81 inv |
3 | 801 inv | 8573 inv |
four | 800077 inv | 857 inv |
five | 80109 inv | 81308333 inv |
6 | 80108 inv | 81300876 inv |
7 | 8077099 inv | 8570757 inv |
eight | 8015 inv | 8135 inv |
9 | 80105 inv | 81305 inv |
a, b | 5 inv | 5 inv |
c | 807799 inv | 857757 inv |
d | 80779 inv | 8577333 inva |
The code itself (to shorten the record of the operation “P → x”, “x → P” and “S / P” are designated as “PI”, “P” and “SP”) is simple and long:
000 1
001 2
002
003
004 ^
005 5
006 -
007 F x>o
008 17
009 5
010 5
011 5
012 5
013 7
014
015 2
016
017 2
018 2
019 2
020 5
021
022
023 ^
024 1
025 +
026
027 5
028
029 5
030 5
031 2
032 2
033
034 2
035 2
036 2
037 2
038 6
039
040
041 ^
042 1
043 +
044
045 6
046
047 6
048 6
049 2
050
051
052 56
053 8
054 9
055
056 2
057 2
058 2
059 4
060 4
061 4
062 4
063 7
064 7
065 7
066 7
067 7
068
069 7
070 7
071 4
072
073
074 87
075 7
076
077 7
078
079 7
080
081
082
083 ^
084 2
085 +
086
087
088 D
089
090 D
091 D
092 4
093
094 6
095
096 5
097 5
098 5
099
100
101 0
102
So, our program mainly consists of operators of displaying “animations” (sequences of register values), stop and unconditional jump operators. For example, our man "shoots" like this:

The real calculator before the new output on the screen extinguished it for a split second - this gave more realism to the "shooting".
Simple, but we really liked the result, and the parents even drew us a letter :)
Have not played enough? The second (and last) code from the same notebook is
tamagotchi (yes, also with graphics):
[1] [1] [1] [1] [1] [\] [] [^] [2] [0] [-] [Fx>/=0] [19] [8] [0] [0] [1] [3] [K] [\] [] [^] [1] [+] [] [\] [] [] [^] [1] [0] [-] [Fx>/=0] [35] [3] [\] [D] [^] [1] [5] [-] [Fx>/=0] [44] [3] [\] [8] [^] [1] [0] [-] [Fx>/=0] [] [53] [3] [] [] [D] [B^] [2] [-] [D] [C/] [6] [7] [8] [] [] [B^] [2] [-] [] [] [] [9] [] [] [8] [^] [3] [-] [8] [\] [4] [\] [B] [] [B^] [10] [-] [Fx>/=0] [93] [2] [1] []
Instructions translated from the language that I took as a child for English:
Press C / P - you will see Andrew. Press / again, and it will start programming. You will see some numbers - this is the output from his programs. Click C / R. After five programs, Andrew will grow to five years. Your goal is to grow it up to 20 by helping Andrew:
1. Feed him. Press BP 65 and C \ P. He will eat, and the hunger coefficient will go down. If the value of the coefficient reaches 10 - he will die, and you will see a great video.
2. Walk with him. Press BP 84 and C \ P. He walks and goes to the toilet. If the value of the "antipulsive" coefficient reaches 10 - it will die. With the video!
3. Sleep. When Andrew is tired, press BP 75 S \ P. To wake up - press \ . With the video.
4. Visit a doctor. When Andrei is 10, he will need to go to the doctor. Press BP 55 C \ P.
If you win - you will see "8 EC", if you lose - "8 ----- 8". Andrew changes as he grows!
Enjoy.
A large number of games from different authors can be found, for example, here:
http://lordbss.narod.ru/pmk.htmlUPD: On mk61.narod.ru there are broken links (to c: \ mysite - I was young and stupid), unfortunately, it is impossible to fix them now, because for 11 years, the mail has changed repeatedly, and passwords have been lost.