ALCOM
Comments aligner for assembler
Code factor
Platforms
Packet info
Installation
PyPi
From 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 forPreferences: 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