Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kkinos/ktc32-asm
KTC32 assembler written in Rust.
https://github.com/kkinos/ktc32-asm
assembler assembly cpu rust
Last synced: about 2 months ago
JSON representation
KTC32 assembler written in Rust.
- Host: GitHub
- URL: https://github.com/kkinos/ktc32-asm
- Owner: kkinos
- License: mit
- Created: 2022-10-31T11:30:52.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-05T14:01:24.000Z (almost 2 years ago)
- Last Synced: 2024-02-18T00:23:30.531Z (12 months ago)
- Topics: assembler, assembly, cpu, rust
- Language: Rust
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ktc32-asm
[![Rust](https://github.com/kinpoko/ktc32-asm/actions/workflows/rust.yml/badge.svg)](https://github.com/kinpoko/ktc32-asm/actions/workflows/rust.yml)
![License](https://img.shields.io/github/license/kinpoko/ktc32-asm?color=blue)ktc32-asm is an assembler written in Rust for [KTC32](https://github.com/kinpoko/ktc32), a hobby 32-bit CPU implemented in SystemVerilog.
## Build
```bash
git clone https://github.com/kinpoko/ktc32-asm.git
cargo build --release
```## Usage
```bash
ktc32-asm -h
KTC32 assemblerUsage: ktc32-asm [OPTIONS]
Arguments:
.asm file pathOptions:
-o output file name [default: a.mem]
-b, --baremetal assemble for bare metal
-h, --help Print help information
-V, --version Print version information
```## Features
- Comments: Single-line comments can be written using `//` syntax.
```asm
// This is a comment
addi r1, r0, 1
```- Label: Labels can be used to mark a location in the code, and the corresponding address can be referenced using the label name.
```asm
start:
jal r0, labellabel:
addi r1, r0, 1
```- Constants: Constants can be defined using a label and referenced in the code by using the label name.
```asm
start:
addi r1, r0, msg
lw r2, r1, 0msg:
0x6c6c6548
```