6502 Calculator
6502 Calculator
An overly complicated way to add positive integers
Overview
I’ve extended Ben Eater’s 6502 bread board computer to function as a calculator. The extension that I’ve designed includes the number pad circuitry and the majority software shown below.
Hardware Design
I extended Ben Eater’s design with a 12 button input. A demultiplexer maps the the 12 inputs to the 6502 interface adaptor chip.
Source Code
The source code is entirely written in 6502 assembly. The software features a simple state machine to facilitate receiving inputs, receiving shifted inputs, receiving operation commands, and executing the operation. All computation is done using Binary-coded decimal, allowing simple conversions to ASCII characters by applying a fixed offset.