salign

Crates.iosalign
lib.rssalign
version1.0.1
sourcesrc
created_at2022-12-03 20:57:10.253405
updated_at2022-12-03 21:03:59.761843
descriptionAlign and prettify comments in asm files
homepage
repositoryhttps://github.com/clowzed/salign.git
max_upload_size
id729252
size27,083
Dmitry Miasnenko (clowzed)

documentation

README

salign

Aligner of comment separator in asm files build Crates.io Crates.io (recent)

Installation

cargo install salign

Or

git clone https://github.com/clowzed/salign.git
cd salign.git
cargo build --release
sudo mv ./target/release/salign /usr/bin

Usage

salign main.asm

Showcase

.model tiny  ;set memory model
.dosseg
.data
        msg db "hello, world!", 0dh, 0ah, '$'; message
.code
.startup
        mov ah, 09h ; moves 09h into ah
        mov dx, offset msg
        int 21h           ;run int 21h
        mov ah, 4ch
        int 21h      ;exit
end

With -e flag

.model tiny                                      ;    set memory model
.dosseg                                          ;
.data                                            ;
        msg db "hello, world!", 0dh, 0ah, '$'    ;    message
.code                                            ;
.startup                                         ;
        mov ah, 09h                              ;    moves 09h into ah
        mov dx, offset msg                       ;
        int 21h                                  ;    run int 21h
        mov ah, 4ch                              ;
        int 21h                                  ;    exit
end                                              ;

Without -e flag

.model tiny                                      ;    set memory model
.dosseg
.data
        msg db "hello, world!", 0dh, 0ah, '$'    ;    message
.code
.startup
        mov ah, 09h                              ;    moves 09h into ah
        mov dx, offset msg
        int 21h                                  ;    run int 21h
        mov ah, 4ch
        int 21h                                  ;    exit
end

Arguments

Short Long What
-h --help Prints help information
-V --version Prints version information
-e --place-separator-on-each-line If setted we will place the separator on each line
-l --lmargin Set amount of spaces between code and separator [default: 4]
-r --rmargin Set amount of spaces between separator and comment [default: 4]
-s --separator Set separator(devider) between code and comments [default: ;]
Commit count: 4

cargo fmt