Skip to main content

No project description provided

Project description

ALCOM

Comments aligner for assembler

Code factor

CodeFactor

Platforms

Linux macOS Windows

Packet info

Downloads Downloads Downloads

Installation

From PyPi

py -m pip install alcom
pip3 install alcom

Usage

CLI Options

short long description help
-f --file Sets filename for aligning If not setted it will align all files in directory recursively
-nbc --align_no_blank_comments Lave no blank comments If not setted no splitters would be placed after codeline

Running

alcom
alcom -f asmfile.asm
alcom -f asmfile.asm -nbc

Example

Before

.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

After

.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                                                              ;    

Tips

VS Code

To add auto aligning after save:

  • Add Run on Save extension
  • Press ctrl + P and search for Preferences: Open Workspace Settings (JSON)
  • Add code below into the opened file and save
{
    "emeraldwalk.runonsave": {
        "commands": [
            {
                "match": ".asm",
                "cmd": "alcom -nbc"
            }
        ]
    }
}
  • You are done!

TODO

  • [❌] Add marging options
  • [❌] Issue that comments separator cam be placed in strings

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

alcom-1.3.0.tar.gz (5.7 kB view hashes)

Uploaded Source

Built Distribution

alcom-1.3.0-py3-none-any.whl (6.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page