mirror of
https://github.com/NohamR/hugo-asm-shortcode.git
synced 2026-04-08 07:59:58 +00:00
Add IDA-style asm display mode
This commit is contained in:
15
README.md
15
README.md
@@ -5,10 +5,11 @@ A Hugo shortcode for displaying assembly code blocks with syntax highlighting, h
|
||||
## Features
|
||||
|
||||
- **Syntax highlighting** for x86 (NASM) and ARM assembly
|
||||
- **Three display modes:**
|
||||
- **Four display modes:**
|
||||
- `raw` - Assembly with syntax highlighting only
|
||||
- `hex` - Hex bytes + assembly instruction
|
||||
- `full` - Address + hex bytes + assembly instruction
|
||||
- `ida` - IDA-style section:address + assembly instruction
|
||||
- **Capitalization option** for hex bytes and addresses
|
||||
- **Dark/light mode** compatible
|
||||
|
||||
@@ -70,11 +71,21 @@ syscall
|
||||
{{</* /asm */>}}
|
||||
```
|
||||
|
||||
### IDA Mode (IDA-style section:address + instruction)
|
||||
|
||||
```go-html-template
|
||||
{{</* asm mode="ida" arch="x86" */>}}
|
||||
__text:000000010045C182 | mov rdi, [rbp+var_88]
|
||||
__text:000000010045C189 | call _RuntimeUnlockString
|
||||
__text:000000010045C18E | mov [rbp+var_88], 0
|
||||
{{</* /asm */>}}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Default | Description |
|
||||
|--------------|---------|--------------------------------------------------|
|
||||
| `mode` | `raw` | Display mode: `raw`, `hex`, or `full` |
|
||||
| `mode` | `raw` | Display mode: `raw`, `hex`, `full`, or `ida` |
|
||||
| `arch` | `x86` | Architecture: `x86` or `arm` |
|
||||
| `capitalize` | `false` | Uppercase hex bytes and addresses when `true` |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user