Skip to content

BOOtak/nibbler_calc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

Nibbler calc

Simple calculator for Nibbler 4 Bit computer

This program performs 3 basic arithmetic operations on 4-digit integer numbers

Coded entirely in assembly with custom assembly preprocessor (for rudimentary call-like instructions, etc.)

Made as part of a bachelor thesis

Build

To build this project, you'll need:

python preprocessor.py calc.asm

nibbler-assembler -o calcu.bin calcu.asm

Run

Download (and optionally build) Nibbler Simulator from the Nibbler file archive mentioned above

Simulator window

Open calcu.bin compiled at the previous step and press "Run"

Arrow buttons below "Source view" control cursor (cursor is not visible in Simulator but hopefully will be on the real device)

Press left/right to move cursor

Press up/down to change digits or arithmetic operation (cycles through multiplication, subtraction and addition)

When cursor is on the last digit, press right to get the result