Thanks to visit codestin.com
Credit goes to github.com

Skip to content

jborza/mcpu-emu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mcpu-emu : an emulator for MCPU

MCPU is a neat minimal 8-bit CPU (CPU design by Tim Boescke, [email protected]) - see its opencores project file and GitHub repo. It fits into 32 macrocells on a CPLD and can operate on 64 bytes of RAM.

Being a minimal CPU it supports only four 8-bit instructions, that consist of 2 bit opcode and 6 bit address/immediate field.

It has two registers - an 8-bit accumulator and 6-bit program counter. MCPU supports 64 bytes of RAM shared between program and data.

The instruction set is:

mnemonic opcode description
NOR 00AAAAAA Acc = Acc NOR mem[AAAAAA]
ADD 01AAAAAA Acc = Acc + mem[AAAAAA], update carry
STA 10AAAAAA mem[AAAAAA] = Acc
JCC 11AAAAAA PC = AAAAAA if carry = 0, clear carry

I've also added an "OUT" instruction according to Jean-Claude Wippler's TFoC - A minimal computer article, with the opcode of 0xFF that prints the accumulator to the standard output.

About

MCPU emulator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published