FRISCjs is a FRISC processor simulator written in JavaScript.
The FRISCjs simulator has two parts: a FRISC assembler (built using PEGjs) which translates FRISC assembly code to machine code and a FRISC CPU simulator which executes machine code.
Furthermore, there are two user interfaces to the simulator: a Web application graphical interface and a NodeJS command-line interface. The Web application interface is available here and supports many cool features like breakpoints and step-by-step execution.
In node, install using npm:
> npm install friscjs
and then access the assembler and simulator:
var friscjs = require("friscjs");
var asm = friscjs.assembler;
var sim = friscjs.simulator;
In a browser, link to the browser script that contains both the assembler and simulator:
<script src="lib/friscjs-browser.js"></script>
and then access the assembler and simulator:
var asm = friscjs.assembler;
var sim = friscjs.simulator;
After installing the libraries, check out the FRISCjs API docs for instructions on using them.
To use the Web-based simulator, launch the webapp/index.html
page in a browser or access the on-line version at http://izuzak.github.com/FRISCjs/webapp/.
To use the console-based simulator application, clone the FRISCjs repo:
> git clone https://github.com/izuzak/FRISCjs.git
and then run the app with node to see the instructions:
> node ./consoleapp/frisc-console.js
git clone https://github.com/izuzak/FRISCjs.git
cd FRISCjs
npm install
./src
), tests (./tests
) or apps (./webapp/*
and ./consoleapp/*
)grunt
(on linux), grunt.cmd
(on windows)npm test
This project was inspired by the GameBoy emulator in JavaScript and jsLinux projects. There are many other processor simulators in JavaScript, such as the GameBoy Color emulator, visual transistor-level simulation of the 6502 CPU, 6502 compatible assembler and emulator and this other 6502 CPU simulator.
FRISCjs was developed by Ivan Zuzak. Contributors: Ivan Budiselic, Stanko Krtalic.
FRISCjs is built with many open-source projects:
Licensed under the Apache 2.0 License.