https://github.com/benmcavoy/strawberryvm
A fantasy virtual machine with limits on resources.
https://github.com/benmcavoy/strawberryvm
assembly fantasy-computer fantasy-console rust virtual-machine
Last synced: 9 months ago
JSON representation
A fantasy virtual machine with limits on resources.
- Host: GitHub
- URL: https://github.com/benmcavoy/strawberryvm
- Owner: BenMcAvoy
- License: mit
- Created: 2024-01-15T10:50:31.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-02T11:20:56.000Z (over 1 year ago)
- Last Synced: 2025-01-29T08:11:17.387Z (9 months ago)
- Topics: assembly, fantasy-computer, fantasy-console, rust, virtual-machine
- Language: Rust
- Homepage: https://docs.rs/strawberryvm
- Size: 121 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
StrawberryVM
A fantasy virtual machine with limits on resources.
« Explore the docs »
Releases
·
Report Bugs
·
Request Features
## TODO
- [x] Basic instructions
- [x] Addition implementation
- [x] Loading from a file
- [x] Text to binary
- [x] Assembler
- [x] Refactoring
- [ ] Turing completion# What's happening with the project?
A new release may not be made for a moment as I am currently developing a programming language for the VM. The VM project is not dropped, I am just making somthing for it that is outside of this repo! Once it is functional it may either be a submodule or simply added into this repo.## Instructions
| Name | Arguments | Description |
|---------------|-------------------------------------------------|-------------------------------------------------------------------------------------|
| No Operation | None | Does nothing. |
| Push | u8 (8-bit value to push) | Pushes an 8-bit value onto the stack. |
| Pop Register | Register (destination register) | Pops a value from the stack into the specified register. |
| Push Register | Register (source register) | Pushes the value of the specified register onto the stack. |
| Add Stack | None | Adds the top two values on the stack. |
| Add Register | Two Registers (operands) | Adds the values of two registers and stores the result in the destination register. |
| Signal | u8 (signal value) | Sends a signal with an 8-bit value. |
| Jump | u8 (target address) | Jumps to the specified address in the program. |
| ShiftLeft | Register (target register)and u8 (shift amount) | Left shifts a specific register by a certain amount. |## Reserved symbols
| Symbol | Use |
|--------|-------------------|
| $ | Hexadecimal value |
| % | Binary value |
| ^ | Label value |## Credits
This project is following along with the live streams by [TomMarksTalksCode](https://www.youtube.com/@TomMarksTalksCode) and this project would not have been possible without him. He can also be found on [GitHub](https://github.com/phy1um) and on his [website](https://coding.tommarks.xyz/).