{"id":13600001,"url":"https://github.com/v420v/vas","last_synced_at":"2025-04-07T08:18:12.228Z","repository":{"id":74282149,"uuid":"576141293","full_name":"v420v/vas","owner":"v420v","description":"x86-64 Assembler written in V","archived":false,"fork":false,"pushed_at":"2025-03-09T13:23:39.000Z","size":1109,"stargazers_count":98,"open_issues_count":2,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-31T06:07:07.423Z","etag":null,"topics":["amd64","asm","assembler","compiler","elf","elf64","gnu-assembler","language","self-hosted","v","vlang","x64","x64-assembly","x86-64"],"latest_commit_sha":null,"homepage":"","language":"V","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/v420v.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-09T05:15:36.000Z","updated_at":"2025-03-09T13:23:43.000Z","dependencies_parsed_at":"2023-11-24T15:29:40.185Z","dependency_job_id":"7a648711-7a5e-4ef0-af04-d28f8a4cd6e5","html_url":"https://github.com/v420v/vas","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v420v%2Fvas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v420v%2Fvas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v420v%2Fvas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v420v%2Fvas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/v420v","download_url":"https://codeload.github.com/v420v/vas/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247615385,"owners_count":20967184,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amd64","asm","assembler","compiler","elf","elf64","gnu-assembler","language","self-hosted","v","vlang","x64","x64-assembly","x86-64"],"created_at":"2024-08-01T17:01:24.413Z","updated_at":"2025-04-07T08:18:12.222Z","avatar_url":"https://github.com/v420v.png","language":"V","funding_links":[],"categories":["V","Applications"],"sub_categories":["Interpreters/Compilers"],"readme":"# vas - An x86-64 Assembler Written in V\n\n[![CI](https://github.com/v420v/vas/actions/workflows/ci.yml/badge.svg)](https://github.com/v420v/vas/actions/workflows/ci.yml)\n\n`vas` is a lightweight assembler written in the V programming language that supports Linux x86-64 assembly with AT\u0026T syntax. It compiles assembly source files into object files that can be linked with `ld`.\n\n## Features\n\n- x86-64 instruction set support\n- AT\u0026T syntax\n- ELF object file generation\n- Support for common assembler directives\n- Standard input support via `-` argument\n\n## Installation\n\n### Docker setup\n\n```sh\n# Build the Docker image\ndocker build ./ -t vas\n\n# Run the container\n# Linux/MacOS:\ndocker run --rm -it -v \"$(pwd)\":/root/env vas\n\n# Windows (CMD):\ndocker run --rm -it -v \"%cd%\":/root/env vas\n\n# Windows (PowerShell):\ndocker run --rm -it -v \"${pwd}:/root/env\" vas\n```\n\n### Build\n\nRequires the V compiler to be installed.\n\n```sh\nv . -prod\n```\n\n## Usage\n\nBasic usage:\n```sh\nvas [options] \u003cinput_file\u003e.s\n```\n\nOptions:\n- `-o \u003cfilename\u003e`: Set output file name (default: input_file.o)\n- `--keep-locals`: Keep local symbols (e.g., those starting with `.L`)\n\n### Example\n\n1. Create an assembly file (hello.s):\n```asm\n# Hello world example\n\n.global _start\n\n.section .data, \"aw\"\nmsg:\n  .string \"Hello, world!\\n\"\n\n.section .text, \"ax\"\n_start:\n  pushq %rbp\n  movq %rsp, %rbp\n  subq $16, %rsp\n\n  movq $1, %rax    # write syscall\n  movq $1, %rdi    # stdout\n  movq $msg, %rsi  # message\n  movq $14, %rdx   # length\n  syscall\n\n  movq $60, %rax   # exit syscall\n  movq $0, %rdi    # status code 0\n  syscall\n```\n\n2. Assemble the file:\n```sh\nvas hello.s\n```\n\n3. Link the object file:\n```sh\nld hello.o\n```\n\n4. Run the executable:\n```sh\n./a.out\n```\n\nOutput:\n```\nHello, world!\n```\n\n## Star History\n\u003ca href=\"https://www.star-history.com/#v420v/vas\u0026Date\"\u003e\n \u003cpicture\u003e\n   \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/svg?repos=v420v/vas\u0026type=Date\u0026theme=dark\" /\u003e\n   \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/svg?repos=v420v/vas\u0026type=Date\" /\u003e\n   \u003cimg alt=\"Star History Chart\" src=\"https://api.star-history.com/svg?repos=v420v/vas\u0026type=Date\" /\u003e\n \u003c/picture\u003e\n\u003c/a\u003e\n\n## Posts on X\n\n- https://x.com/v_language/status/1643642842214957061\n\n- https://x.com/ibuki42O/status/1607026393518604290\n\n- https://x.com/ibuki42O/status/1670080123369058304\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv420v%2Fvas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fv420v%2Fvas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv420v%2Fvas/lists"}