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 pythonRSC 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pythonRSC-0.1.3.tar.gz
.
File metadata
- Download URL: pythonRSC-0.1.3.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5c59202462c5b0a32962a542ffb4566f9386a679b3b7d6eec18980ebbf09341 |
|
MD5 | e3263ec9591ba74746d05c276794094a |
|
BLAKE2b-256 | 023859ac8e9825b9c587729f6ae4524f38be921addb1f964aeabfea40e3c9bc5 |
File details
Details for the file pythonRSC-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: pythonRSC-0.1.3-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2b402d998a09658c59df0a512a180e8625df1e86314b917b6c70b677e5f1a81 |
|
MD5 | f4981d2ce6568f169602674455b9ea64 |
|
BLAKE2b-256 | 7e12a6cb6bc097ee07758e65eba37984189028a44bfabf7196482c60948cdfee |