Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ibaryshnikov/toy-asm-dsl
Toy asm-like dsl
https://github.com/ibaryshnikov/toy-asm-dsl
Last synced: 6 days ago
JSON representation
Toy asm-like dsl
- Host: GitHub
- URL: https://github.com/ibaryshnikov/toy-asm-dsl
- Owner: ibaryshnikov
- Created: 2019-01-22T19:15:05.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-22T19:51:17.000Z (almost 6 years ago)
- Last Synced: 2024-11-09T06:44:03.033Z (2 months ago)
- Language: Rust
- Size: 1000 Bytes
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### A toy asm-like dsl
It's an example of a dsl built with rust declarative macroThe set of instructions only contains `mov`, `add`, `sub`, `mul`, `div`
#### Usage example
```
asm! {
mov ebx 1;
mov edx 2;
add ebx edx;
print ebx // should print 3
}
```
There is no `print` instruction in asm, but it's useful in examples, so I added it#### Building
Edit `main.rs` and than use `cargo run` to run it#### Goalds
There is no goal to create a correct asm implementation.Instead I made a simplified dsl to show how asm code may look,
without the need of setting up the real environment or going too deep into the
low level details