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.

With this program, you can generate bytecode from microcode files for Logisim or just emulate microcode files out right. Additionally, you can debug your program and see its every step.

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

Emulating and debugging your microcode using pythonRSC

If you want to debug your program, pythonRSC provides an easy-to-use debugger similar to GDB Debugger. To start the emulator with the debugger, use the following command.

pythonRSC debug microcode.txt

After executing, you will be met with a blinking >> awaiting your next command. The list of commands accepted by the debugger are listed below.

stepi [stepsize] This will 'step' forward once if stepsize is not provided, otherwise it will step as many times as provided in stepsize

bp [addr|label] This will set a breakpoint at the given address in hex or decimal or at a given label. Breakpoints are enabled on initialization.

enable [addr|label] This will turn on a breakpoint if it was disabled.

disable [addr|label] This will turn off a breakpoint.

disas [start] [end] This will take a range of addresses and disassemble the instructions. Hexadecimal or decimal.

disas This variation of the disassemble command will try to identify if you are inside a label and disassemble that label for you. This is under construction and may produce bugs.

print [type] [reg] This will print a register in your desired format (type). The types are /d (decimal) /t (binary) /x (hexadecimal)

run Resumes emulation unless a breakpoint is hit or HALT is met.

info This will print the current state of the emulator, in other words print all registers.

help This will just list the possible commands.

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.2.2.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

pythonRSC-0.2.2-py3-none-any.whl (21.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pythonRSC-0.2.2.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for pythonRSC-0.2.2.tar.gz
Algorithm Hash digest
SHA256 cf8e0708e83ab27d729676d1935e73ab8195b88aa69ba649d43851becee1f9f4
MD5 2d041b7cc3b87f3fa0777490b1bdacbb
BLAKE2b-256 4fec8358b89637722380a01f42ccb745a85a568d088c4327a25ce59d9682a859

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pythonRSC-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 21.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for pythonRSC-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 19b6d6776d6106e1f77b0adef223e824fa4afd454c39257d72f7153c7611a33a
MD5 e99049844fe06639971bd19099e4f037
BLAKE2b-256 b7b33e07a5d2674641c57106c271acb35822a038d496cfa17b52041fdc70046a

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