Assembly ELF i386 Extension

A Visual Studio Code extension for elf_i386 assembly language, providing syntax highlighting, autocomplete, hover documentation, snippets, and more.
Features
1. Syntax Highlighting
- Highlights assembly instructions, registers, directives, comments, strings, and numbers.
- Example:
section .data
message db "Hello, World!", 0
section .text
global _start
_start:
mov eax, 4 ; sys_write
mov ebx, 1 ; stdout
mov ecx, message ; pointer to message
mov edx, 13 ; length of message
int 0x80 ; interrupt
2. Autocomplete
- Provides real-time suggestions for:
- Instructions (
mov , add , sub , etc.)
- Registers (
eax , ebx , ecx , etc.)
- Directives (
section , global , extern , etc.)
- Context-aware suggestions (e.g., suggest registers after
mov ).
3. Hover Documentation
- Displays detailed descriptions when hovering over instructions, registers, or directives.
- Example:
4. Snippets
- Predefined code snippets for common patterns:
- Define a section:
section
- Declare a global symbol:
global
- Insert a
mov instruction: mov
5. Linting
- Detects common errors in assembly code (e.g., invalid instructions or undefined labels).
6. Boilerplate Generator
- Includes a command to generate boilerplate assembly code:
- Command:
Generate Assembly Boilerplate .
Installation
From the VSCode Marketplace
- Open VSCode.
- Go to the Extensions view (
Ctrl+Shift+X or Cmd+Shift+X on macOS).
- Search for "Assembly ELF i386".
- Click Install.
From Source
- Clone this repository:
git clone https://github.com/your-repo/assembly-elf-i386.git
cd assembly-elf-i386
- Install dependencies:
npm install
- Compile the extension:
npm run compile
- Press
F5 to launch a new VSCode window with the extension loaded.
Usage
Syntax Highlighting
Open any .asm file, and the extension will automatically apply syntax highlighting.
Autocomplete
Start typing assembly instructions, registers, or directives, and suggestions will appear.
Hover Documentation
Hover over an instruction, register, or directive to see its description.
Snippets
Type one of the predefined prefixes (e.g., mov , section ) to insert a snippet.
Generate Boilerplate
- Open the Command Palette (
Ctrl+Shift+P or Cmd+Shift+P on macOS).
- Search for and select
Generate Assembly Boilerplate .
Contributing
Contributions are welcome! If you'd like to contribute, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature ).
- Commit your changes (
git commit -m 'Add some feature' ).
- Push to the branch (
git push origin feature/your-feature ).
- Open a pull request.
License
This project is licensed under the MIT License.
Acknowledgments
- Inspired by the need for better tooling for
elf_i386 assembly development.
- Built using the VSCode Extension API.
If you have any questions or feedback, feel free to reach out:
- Email: dawdameet6338@gmail.com
- GitHub: dawdameet
| |