Download asm/bootstrap.asm from Snapkitty/snapkitty-twin-mars-asm: direct link, hf CLI and curl.
- Browser
- Download file 522 Bytes
-
https://huggingface.co/Snapkitty/snapkitty-twin-mars-asm/resolve/main/asm/bootstrap.asm
- Command line
-
hf download hf://Snapkitty/snapkitty-twin-mars-asm/asm/bootstrap.asm
-
curl -L -o bootstrap.asm https://huggingface.co/Snapkitty/snapkitty-twin-mars-asm/resolve/main/asm/bootstrap.asm
522 Bytes
| ; bootstrap.asm — _start: parse argc/argv/envp, call main, exit | |
| ; OBSERVED: ELF64 entry point, System V AMD64 ABI stack layout | |
| "include/syscall.inc" | |
| .text | |
| _start | |
| main | |
| _start: | |
| ; On entry: rsp -> argc, rsp+8 -> argv[0], ... | |
| pop rdi ; argc | |
| mov rsi, rsp ; argv | |
| lea rdx, [rsp + rdi*8 + 8] ; envp | |
| ; Align stack to 16 bytes before call | |
| and rsp, ~0xF | |
| sub rsp, 8 | |
| call main | |
| ; exit(rax) | |
| mov rdi, rax | |
| mov rax, SYS_EXIT_GROUP | |
| syscall | |