Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/engineersbox/quac-assembler

Assembles QuAC assembly into 16 bit QuAC v1.0 ISA binaries
https://github.com/engineersbox/quac-assembler

asm assembler assembly go golang quac

Last synced: 6 days ago
JSON representation

Assembles QuAC assembly into 16 bit QuAC v1.0 ISA binaries

Awesome Lists containing this project

README

        

# QuAC-Assembler
Assembles QuAC assembly into 16-bit QuAC v1.0 ISA binaries

The specification for QuAC v1.0 can be found here:

## Installation

The standard installation can be done with `install.sh` which will build the assembler into a binary
and store it in `/usr/bin/quac_assembler`.

```shell
./install.sh
```

If you want to build from source, simply run the following.

```shell
go build src/assembler.go
```

## Usage

You'll need to build the assembler first before doing this, see the above section for details on that.

```shell
quac_assembler
```

### Example

```shell
quac_assembler test.S result.bin
```

This will compile the following assembly

```asm
movl r1, 0x9 ; 0x0109
; Test
movl r2, 1
ldr r3, [r1]
test:
add r3, r3, r2
str r3, [r1]
jpeq test
nop
.word 0
.word 0
.word 0xFF
```

Into the following binary data

```
┌────────┬─────────────────────────┬─────────────────────────┬────────┬────────┐
│00000000│ 01 09 02 01 53 10 83 32 ┊ 43 10 0f 30 00 00 00 00 │•_••S•×2┊C••00000│
│00000010│ 00 00 00 00 00 ff ┊ │00000× ┊ │
└────────┴─────────────────────────┴─────────────────────────┴────────┴────────┘
```