Is This Assembly Language?

assemblyprogramming-languages

In my childhood I used to program on an MK-61 Soviet calculator. It had four operating registers (X, Y, Z, T) and 15 storage registers. A program could have 105 steps.

As I recall it, it had commands like:

  • Swap X and Y registers
  • Shift registers (Z to T, Y to Z, X to Y)
  • Copy from storage register (1..15) to X
  • Copy from X to storage register (1..15)
  • If X < 0 then go to program step ##
  • Perform operation (+, -, *, /) using X and Y values and put result to X

Is this command set an assembly language? Did I have a basic idea of assembly languages by using this device?

Device

It turns out it is something called "keystroke programming".

Funny fact: a similar calculator (like this one, but with energy independent memory) was used as a back-up hardware for space mission trajectory calculations in 1988. 🙂

Best Answer

This is not an assembly language, this is a machine language.

Machine language is anything that physically means something to the machine. In the case of pocket computers, it's key presses, encoded into numbers in the machine. You don't give more information about this Electronika MK61 machine, so I'll give the example of the TI-57: the machine language used the number of the key given as column in the tens and line in the units. So for example, a program that would increment the memory 8 would be:

33 8  57 1 58 23

This is machine language: it's what's directly interpreted by the machine.

Assembly language would be the human readable text:

RCL 8 
+
1
=
STO 8

To transform this text into the sequence of machine codes, you would need an assembler, which may be a program, or a human who would translate that text into the sequence of numbers.

The confusion is often done, because there's often a quite direct translation from the assembly language to the machine language, but this is not always an entirely direct translation: macro assemblers have powerful macros that may do a lot of work in the assembler and generate a lot of machine language instructions from a single assembly instruction. The mere translation of symbolic addresses may involve changing the op-code of the branch instructions (for example, when switching from short relative addressing to long relative or absolute addressing), so it's not always as direct as you'd think.

Related Topic