Machine Code Made Simple
High-level programming languages simplify software development, but they also hide a lot of what is actually going on inside a computer. Writing a few programs in machine code can go a long way toward developing a better understanding of how computers work, but with the complexity of modern instruction sets, that is not especially easy for a beginner. Electronics hobbyist David Johnson-Davies has come up with a way to make the experience a bit more approachable. His latest creation, called the Pocket MINIL Computer, is a handheld computer with a simplified instruction set and a built-in development environment.
Rather than basing the computer on the instruction set of an existing processor, Johnson-Davies dusted off a hypothetical processor architecture that he developed over 10 years ago called MINIL (MINiature Interpreted Language). With just 16 instructions, MINIL is simple enough that one can commit the entire instruction set to memory without too much effort. The processor has eight 16-bit registers and supports basic arithmetic operations, conditional jumps, subroutines, and stack operations.
Some care was taken in designing the instruction set to eliminate the need for an assembler. To copy the contents of register R4 into R3, for example, one simply enters the hexadecimal value 0x34. And to make it easier to follow along with what you are doing, the corresponding assembly language instruction is displayed alongside each opcode as it is entered.
The hardware was built around an AVR64DD14 microcontroller that runs at 24 MHz and serves as the MINIL interpreter. A 128x64 pixel OLED display has enough room to show eight lines of a program listing. To minimize the number of I/O pins needed to interface with the keypad, Johnson-Davies made use of a resistor ladder that produces a distinct voltage for each keypress at a single analog input. Four colored LEDs were also included to give programmers something to interact with outside of the display.
All of these co




Comments
No comments yet. Be the first to share your thoughts.