Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Clone or download
Launching GitHub Desktop...
If nothing happens,download GitHub Desktop and try again.
Launching GitHub Desktop...
If nothing happens,download GitHub Desktop and try again.
Launching Xcode...
If nothing happens,download Xcode and try again.
Launching Visual Studio...
If nothing happens,download the GitHub extension for Visual Studio and try again.
Fetching latest commit…| Failed to load latest commit information. | |||
![]() | asm | Initial revision. | |
![]() | files | Initial revision. | |
![]() | Makefile | Add support for NodeJS on Windows | |
![]() | README.md | Minor typo | |
![]() | console.js | ||
![]() | i8080.js | Initial revision. | |
![]() | i8080_disasm.js | Initial revision. | |
![]() | i8080_test.js | Initial revision. | |
![]() | i8080_trace.js | Initial revision. | |
![]() | index.html | Initial revision. | |
![]() | main.js | Initial revision. | |
![]() | rkdump.c | Initial revision. | |
README.md
Intel 8080 (KR580VM80A) microprocessor in JavaScript
This project is an implementation of the Intel 8080 microprocessor inJavaScript. This implementation passes successfully all tests for theKR580VM80 clone of Intel 8080 used in thei8080-core project.The emulator is independent from particular hardware. Memory and IOobjects are passed as parameters to the constructor.
This implementation doesn't use JavaScript Typed Arrays, and also opcodedecoding is implemented in a disassembler way.
It is tested on Chrome (Mac, Windows) and Safari (Mac, Windows).
Build (Mac)
makeThis command will generate a test web page and launch the current web browser(on Mac). This web will run 3 tests: TEST.COM, CPUTEST.COM, 8080PRE.COM.
When you open the JavaScript console in the browser, you should see thefollowing:
Intel 8080/JS test*********************************File "TEST.COM" loaded, size 1793OUTPUT: MICROCOSM ASSOCIATES 8080/8085 CPU DIAGNOSTIC VERSION 1.0 (C) 1980OUTPUT: OUTPUT: CPU IS OPERATIONALJump to 0000 from 14f*********************************File "CPUTEST.COM" loaded, size 19200OUTPUT: OUTPUT: DIAGNOSTICS II V1.2 - CPU TESTOUTPUT: COPYRIGHT (C) 1981 - SUPERSOFT ASSOCIATESOUTPUT: ABCDEFGHIJKLMNOPQRSTUVWXYZOUTPUT: CPU IS 8080/8085OUTPUT: BEGIN TIMING TESTOUTPUT: END TIMING TESTOUTPUT: CPU TESTS OKOUTPUT: Jump to 0000 from 3b25*********************************File "8080PRE.COM" loaded, size 1024OUTPUT: 8080 Preliminary tests completeJump to 0000 from 32fThe main test 8080EX1.COM only runs when you use a standalone JavaScriptinterpreter (V8 or SpiderMonkey) because it may take longer than an hour.
make run-v8or
make run-jsOn Mac you can install V8 and JS (SpiderMonkey) viabrew:
brew install v8brew install spidermonkeyBenchmark
Time to run all 4 tests (TEST.COM, CPUTEST.COM, 8080PRE.COM, 8080EX1.COM) onMacBook Air 2GHz. The NodeJS test was performed on Windows 7 SP1 (i7 3.40GHz64-bit).
| Implementation | Language | JavaScript engine | Time |
|---|---|---|---|
| i8080-core | ANSI-C | - | 0m58.793s |
| i8080-js | JavaScript | V8 3.9.24 | 35m0.627s |
| i8080-js | JavaScript | SpiderMonkey 1.8.5 | 166m43.369s |
| i8080-js | JavaScript | NodeJS 0.10.21 | 18m48.38s |
Using the emulator
An example of embedding the emulator can be found in the filei8080_test.js.You need to supply Memory and IO objects to the constructor of the I8080 class.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
