assembly
1
总安装量
1
周安装量
#78495
全站排名
安装命令
npx skills add https://github.com/g1joshi/agent-skills --skill assembly
Agent 安装分布
mcpjam
1
claude-code
1
replit
1
junie
1
windsurf
1
zencoder
1
Skill 文档
Assembly
Low-level language with a very strong correspondence between the instruction in the language and the architecture’s machine code instructions.
When to Use
- Operating System Kernels
- Embedded Systems / Microcontrollers
- Reverse Engineering
- Extreme optimization (rarely needed today)
Quick Start (x86_64 Linux)
section .data
msg db "Hello, World!", 0xa
len equ $ - msg
section .text
global _start
_start:
mov rax, 1 ; write syscall
mov rdi, 1 ; stdout
mov rsi, msg ; buffer
mov rdx, len ; length
syscall
mov rax, 60 ; exit syscall
xor rdi, rdi ; exit code 0
syscall
Core Concepts
Registers
Small, fast storage locations directly in the CPU (e.g., RAX, RBX, RIP).
Instructions
Commands executed by the CPU (MOV, ADD, SUB, JMP).
Stack
Region of memory for storing local variables and return addresses (USH, POP).
Best Practices
Do:
- Use comments liberally (assembly is hard to read)
- Follow calling conventions (e.g., System V AMD64 ABI)
- Use descriptive labels
Don’t:
- Hand-optimize unless you beat the compiler (unlikely)
- Ignore alignment requirements