Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/v420v/vas
x86-64 Assembler written in V
https://github.com/v420v/vas
amd64 asm assembler compiler elf elf64 gnu-assembler language self-hosted v vlang x64 x64-assembly x86-64
Last synced: 5 days ago
JSON representation
x86-64 Assembler written in V
- Host: GitHub
- URL: https://github.com/v420v/vas
- Owner: v420v
- License: mit
- Created: 2022-12-09T05:15:36.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-09T10:12:37.000Z (6 months ago)
- Last Synced: 2024-12-07T19:43:05.580Z (14 days ago)
- Topics: amd64, asm, assembler, compiler, elf, elf64, gnu-assembler, language, self-hosted, v, vlang, x64, x64-assembly, x86-64
- Language: V
- Homepage:
- Size: 1.05 MB
- Stars: 97
- Watchers: 3
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-v - vas - A simple x86-64 assembler written in V. (Applications / Interpreters/Compilers)
README
# vas: Assembler written in V
[![CI](https://github.com/v420v/vas/actions/workflows/ci.yml/badge.svg)](https://github.com/v420v/vas/actions/workflows/ci.yml)
Supports Linux x86-64 AT&T syntax only.
## Hello world!
```asm
# Hello world!.global _start
.section .data, "aw"
msg:
.string "Hello, world!\n".section .text, "ax"
_start:
pushq %rbp
movq %rsp, %rbp
subq $16, %rspmovq $1, %rax
movq $1, %rdi
movq $msg, %rsi
movq $14, %rdx
syscallmovq $60, %rax
movq $0, %rdi
syscall```
```sh
$ docker build ./ -t vas# Linux or MacOS:
$ docker run --rm -it -v "$(pwd)":/root/env vas# Windows (CMD):
$ docker run --rm -it -v "%cd%":/root/env vas# Windows (PowerShell):
$ docker run --rm -it -v "${pwd}:/root/env" vas# To leave the environment, enter `exit`.
```## Build
```sh
$ v . -prod
```## Run
```
$ vas .s
$ ld .o
$ ./a.out> Hello world!!
```
## License
MIT