Assembler programmable calculator

That sounds very strange. But here is a really binary programmable calculator that is programmed in Assembler.


Why is this needed?


This is an effective learning tool for those who want to become familiar with the Assembler programming language. But he does not know where to start. Here "all in one bottle."


This is a fun toy for "real programmers". Which include the same "children", who are now only over 60. But who remember, and LGP-30, and Altair 8800, and PDP-11. And to whom, we hope, this toy will be a pleasure.


This is just a very useful logical puzzle toy. With which you are not wasting your time. Here you solve real problems that at the dawn of computing, "real programmers" really solved. And which very often were a real challenge to professionalism. Along the way, you acquire Assembler programming skills. And refresh in your memory your old knowledge from the field of mathematics.

Do you need to learn Assembler?

There is still a lot of talk on the net about "Do I need to learn Assembler"? Most authors provide the following arguments in favor of this idea:

Assembler is still used to program various devices on microcontrollers. Which are very many. Since it is Assembler that allows you to most effectively manage all the hardware resources of such A12.

Assembler is used to optimize programs that are written in higher-level languages.

Assembler’s experience provides insight into how magic happens. Which "turns" into a "living" intelligent computer "iron", which "can" work only with binary numbers, zeros and ones.


Back to the past

Fortunately, many of those unique engineers and programmers remained among us, thanks to whom it became possible to fly to the moon and create the first computers. And then the first microprocessors. There were people who solved problems using this technique. The very first computers had limited resources. And for this, solving problems with their help has often become a real engineering feat.

And often, one more argument can be heard from these people. "Yes, at the level of modern development of computer technology, of course you can solve very complex problems. But you try to solve them in conditions of limited limited resources. As we did." And we deeply respect the merits and invaluable experience of these engineers.

In this program, we tried to combine the atmosphere and the special charm of the first computers with a training tool, thanks to which you can gain skills in working with the Assembler language. At the same time, you are given the opportunity to work in harsh conditions of limited resources, in which "real programmers" had to work.


ENIAC (Electric Digital Integrator and Computer) was created in 1946. The grandfather of modern computers was 5.50 meters high and 25 meters long, weighed about 30 tons and occupied an area of 180 m². It consisted of 70,000 resistors and approximately 18,000 vacuum tubes. And consumed at least 200 kW. The computer was commissioned by the US Army for use in the ballistic research laboratory. ENIAC was less powerful than current calculators.

Why calculator?


We called this program "calculator." Because outwardly it resembles an old programmable calculator. But, you will not see the familiar scoreboard with Arabic numerals here. Instead, you see rows of indicators. Which display register values (result register, input register and address counter register). Just like the first computers did, at the dawn of computing.

The calculator is a virtual computer with von Neumann architecture. The following resources are at your disposal:

icon Architecture

8-bit processor, which has an 8-bit accumulator, as well as 8-bit registers mapped to memory: instruction counter; input register; output register; stack pointer and flag register.

icon Memory

256 bytes of memory (exactly the same as it was in the first versions of the Altair 8800).

icon Commands

The command system is quite well developed, and consists of 73 commands. The command system can be found on a separate page >>>

Calculator features

Set the address
of the memory

Write any byte
to any memory

Read any byte
from any memory

Run a program
written in

Step by step
to execute the program
in debug mode

Save or load
a program written in

In fact, the capabilities of the calculator are somewhat wider. The purpose of the buttons and instructions for working with them are contained on a separate page >>>

Some people may tell us that you need to be a little crazy to try to work with such limited resources. But in this madness we see genius, - try to travel back in time to the time of the first computers and at least partially find yourself in conditions of limitations. In which real programmers managed to solve quite complex problems.


Why does our virtual machine have an 8-bit processor? Yes, in the old days there were computers that worked with words with different numbers of digits. But, as a result of evolution, microcontrollers and microprocessors now have a multiple of 8. There is also an 880-bit Intel 8080 grandson and great-grandson in everyday life. Which was used in the "grandfather" of modern PCs - the Altair 8800.

Why did we choose exactly 256 bytes of memory? This allowed us to operate with only bytes in the addressing of memory cells of the address space. This simplifies the command system and familiarity with Assembler. And it makes it easier for a beginner to acquire skills in working with him. Since it leaves behind the scenes features of addressing a larger memory. For example, those that are implemented in a 16-bit Intel 8086. About which many Chechako risk breaking their teeth. And what could be the reason that some of the newcomers abandoned the idea of ​​learning Assembler. And besides. Do not forget that many of the first machines did not have such "luxury" as 256 bytes of RAM. So, in this case, we will assume that you are still very lucky.


In the 80s, computers occupied separate floors of buildings. Transistors have replaced unreliable and energy-consuming lamps. Programmers stored their programs on punch cards and punched tapes.

Demonstration of the processor

Moreover. Values that are contained in 256 memory cells can be displayed as a 16x16 or 8x32 matrix. That allows you to make the calculator not only simple and accessible for study, but "live". And keep track of exactly how the values of memory cells change during the execution of the program. That is very useful, for example, if you want to clearly explain to the student how the microprocessor works.

Memory cells display helps to keep track of how values change in them during program execution. This will be useful, for example, if you want to explain to the student how the microprocessor works.

We got a very clear demonstration of how the processor works. Users can quickly see the contents of each memory location. And change the contents of the memory cell. We can observe how the contents of registers and memory cells change during the execution of commands. In addition, the user is provided with a convenient tool for debugging programs.

Benefits of Restrictions

In the best of times, “real programmers” did not have the luxury of a keyboard and a display on which you could see the contents of memory cells. In order to better feel the limited capabilities of the input-output devices with which they worked, you should try not to use the "Display" tab, but to work directly with the information that is displayed on the indicator lamps. "Display" is a luxury that came much later.

In many modern computers, including the PC series, for writing numbers in the binary system, the order of writing bits (left to right) from the most significant bits to the lower ones is accepted. Therefore, we had to change the order of the keys from 0 to 7 on the keyboard of our calculator. In order for each of them to be located directly under that bit-flashlight, the value of which it changes.


Display of memory elements status and registers in the Astra-256


Command system

The command system is quite developed, and contains 74 commands. Which are conditionally divided into groups:

You can learn more about the command system on the page >>>

Yes, the command system is quite developed. Many "real programmers" were available only a couple - three dozen of the simplest commands. Which "were able" to carry out the first computers. But, for completeness of sensations, no one forbids the user to use only part of this system of commands. So much more interesting.

And for a novice user, it’s quite enough to know only a part of the commands. In order to start writing your first programs in Assembler. No need to know all the commands. Moreover, there is always a "Help View" button at hand.

In addition, in the "input / output commands" section, we implemented keyboard commands. The "real programmers" did not have these capabilities. But we deliberately took this step in order to make our calculator interactive. And give you more opportunities to implement your own ideas.

A Good Ground for Further Growth

We deliberately went to provide the user with an expanded system of commands. Since these or similar commands you will find in all modern microcontrollers and microprocessors. And one of the tasks of our toy is precisely to educate the user with the Assembler language, and to gain basic experience at a low hardware level. On the basis of which you can master any modern microcontroller in the future. After all, the basic principles of their work remain unchanged.

In real life, you will encounter commands that will be called differently in the descriptions of different microcontrollers. But they will perform essentially the same operations. You will surely come across commands to work with the internal registers of the processor, and not just with the accumulator (as implemented here). You will find more complex schemes and addressing commands, far exceeding the limit of 256 bytes, which provide 8 bits. You will find many commands working with hardware resources, which are many in the composition of modern microcontrollers.

But experience with our program will allow you to confidently go further. And master the programming of any modern microcontroller. It is likely that the programs that you implemented using our calculator can be adapted to implement your tasks on other controllers. Why not? After all, they are already debugged by you and work for an 8-bit virtual machine. And at the same time they occupy a small amount of memory. The principle of operation of digital devices remains unchanged.

Programming in Assembly


Display of the Assembler program in the ASTRA-256 App

The calculator allows to display the sequence of commands in Assembler.

Do not forget that it is a luxury. Real programmers worked with the contents of the memory with a pencil, paper, toggle switches and indicators. And at best, they had printouts with program codes.


Try Assembler

We hope that for schoolchildren and students our calculator will be interesting. And useful for gaining an understanding of Assembler and low-level work experience. We tried to create a convenient tool in which "everything is at hand", and which allows you to concentrate and puzzle over the implementation of real tasks in the context of limited resources. And simultaneously refresh some knowledge from the field of algorithms and mathematics. And the "children" of older age, this toy is just a pleasure.

Writing on Assembler not only a game interactive program, a program for extracting the square root or trigonometric function is a real challenge. Is not it? And "real programmers" solved these problems in quantity. And thanks to their engineering feat, people visited the moon. Can you repeat at least some of this?

Buy calculator

In order for more users to be able to use our Calculator, we’ve developed versions for various types of devices, including smartphones, tablets and PCs. They will be available soon at the following markets:

google play Coming soon...
itch Coming soon...
app-store Coming soon...

To purchase a Calculator, visit one of the stores