Crates.io | asmfmt |
lib.rs | asmfmt |
version | 1.0.0 |
source | src |
created_at | 2024-02-26 12:07:18.357127 |
updated_at | 2024-02-26 12:07:18.357127 |
description | A formatter designed for programs in assembly language with AT&T syntax |
homepage | |
repository | https://gitlab.com/mateolafalce/asmfmt |
max_upload_size | |
id | 1153487 |
size | 46,497 |
A formatter designed for programs in assembly language with AT&T syntax.
asmfmt <file.asm>
cargo install asmfmt
asmfmt update
global _start
section .rodata
nl: db 10
nl_len: equ $ - nl
section .text
_start:
call new_line
call exit
new_line:
mov rax, 1 ; write(
mov rdi, 1 ; STDOUT_FILENO,
mov rsi, nl ; text,
mov rdx, 1 ; sizeof(text)
syscall ; );
ret
exit:
mov rax, 60 ; exit(
mov rdi, 0 ; EXIT_SUCCESS
syscall ; );
global _start
section .rodata
nl: db 10
section .text
_start:
call new_line
call exit
new_line:
mov rax, 1 ; write(
mov rdi, 1 ; STDOUT_FILENO,
mov rsi, nl ; text,
mov rdx, 1 ; sizeof(text)
syscall ; );
ret
exit:
mov rax, 60 ; exit(
mov rdi, 0 ; EXIT_SUCCESS
syscall ; );