Skip to main content

An emulator for the RSC architecture written in Python.

Project description

pythonRSC ( Relatively Simple Computer in Python )

pythonRSC is an emulator for the RSC architecture written in Python.

Installing pythonRSC

To download the package, you can simply use pip.

pip install pythonRSC

Emulating your microcode using pythonRSC

After downloading the package, you should have access to a command called 'pythonRSC'. To use this command, you will need a microcode file to emulate. There are some test files provided.

pythonRSC run microcode.txt

This will parse the given microcode and output the state at the end of emulation.

Generating bytecode using pythonRSC

If you desire to use the in-built assembler to parse the microcode into logisim bytecode, there is a command for that. You will need to provide a microcode input file and it requires an output file to function.

pythonRSC assembler microcode.txt output.txt

Using pythonRSC as a library

To use this package as a library, you can simply import the classes that you wish to use in your own python code. To learn more about those classes, you will need to read the source code.

This example shows some in-built functions inside of pythonRSC that you could use.

from pyRSC import RSC


pyRSC = RSC("tests\\avg.txt")
pyRSC.run() # Runs the given instructions and gives you an output!
pyRSC._assembler.logisim_format("output.txt") # Logisim-formatted binary output
pyRSC.mem.disasm(0x0, 0x1F) # Disassembly of the given instructions

Emulating and debugging your microcode using pythonRSC

The debugger is still currently in later stages of development.

Breakpoints, instruction disassembly, and control flow will all be at your fingertips soon enough.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pythonRSC-0.1.2.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

pythonRSC-0.1.2-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file pythonRSC-0.1.2.tar.gz.

File metadata

  • Download URL: pythonRSC-0.1.2.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.0

File hashes

Hashes for pythonRSC-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a770fffe17022e16d47edee775edaa0442bdaed83fc3b80a4bb0668761a7a891
MD5 ac7918c7e65c42fa0d89e2b557179659
BLAKE2b-256 feb22947a1ad90f58ada5db8b2662f24b7b76f329e12505764fd2d761c6c1f26

See more details on using hashes here.

File details

Details for the file pythonRSC-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pythonRSC-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 21.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.0

File hashes

Hashes for pythonRSC-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9f2fe07014ff96a645b1c34b76678987e6608a60eaac7c6fa25dd98d6905783a
MD5 d4acfb7152dd660c3aeeca3a0dcbff62
BLAKE2b-256 bafd87301a4487d653af01fefab1162458b93ab039e8714399c297108effe8a7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page