GithubHelp home page GithubHelp logo

riscygeek / cosmos-cp1 Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 20 KB

A small assembler & emulator for the Cosmos CP1 machine

License: GNU General Public License v3.0

C 100.00%
cosmos cp1 c assembly assembly-language assembler retro school-project

cosmos-cp1's Introduction

Cosmos CP1

I found an old computer from the 80s.
It has 128 Words of RAM used by both the code and the data.
It also has a very simplistic reduced instruction set (RISC).
In the future I will add a picture of the original computer and it's instruction set

Instruction Set

name opcode description
HLT 01.000 Halts the processor
PRINT 02.000 Prints the contents of the accumulator
SLEEP 03.xxx Sleeps for xxx milliseconds
LDC 04.xxx Loads a constant into the accumulator
LDA 05.xxx Loads the Contents of [xxx] into the accumulator
STA 06.xxx Stores the Contents of the accumulator to [xxx]
ADD 07.xxx Adds the Contents of [xxx] to the accumulator
SUB 08.xxx Subtracts the Contents of [xxx] from the accumulator
JMP 09.xxx Jumps to the address xxx
CMPE 10.xxx Compares the accumulator to [xxx] for equality
JC 11.xxx Jumps to xxx if last compare was true
CMPGR 12.xxx Tests if the accumulator is greather than [xxx]
CMPLE 13.xxx Tests if the accumulator is less then [xxx]
NEG 14.000 Negates the Contents of the accumulator
AND 15.xxx Bitwise AND the accumulator with [xxx]
POUT 18.000 Writes the Contents of the accumulator to the Output port

cosmos-cp1's People

Contributors

riscygeek avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.