Files
gasm-sdk/docs/man/gasm-dis.1
T
petrbalvin 93c47a312a
Test / test (push) Successful in 2m4s
feat(docs): man pages for gasm and every command, guarded against CLI drift
Assisted-by: GLM 5.3 Flash
2026-09-19 21:18:43 +02:00

37 lines
1.0 KiB
Groff

.TH GASM-DIS 1 "2026-09-19" "gasm 0.33.0" "User Commands"
.SH NAME
gasm-dis \- disassemble machine code to instruction text
.SH SYNOPSIS
.B gasm dis [\-a arch] <file>
.SH DESCRIPTION
Disassemble machine code to instruction text, decoded through
golang.org/x/arch.
.PP
With a
.I .s
file, the file is assembled first and the listing follows the real
layout: one block per TEXT function, local labels printed at their
offsets. The architecture comes from the file-name suffix, or from
.BR \-a .
.PP
With any other file, or
.B \-
for standard input, the bytes are disassembled linearly and
.B \-a
selects the architecture (amd64, arm64, riscv64 or loong64).
.SH OPTIONS
.TP
.B \-a \fIarch\fR
Architecture for raw input: amd64, arm64, riscv64 or loong64.
.SH EXIT STATUS
Exits 0 on success, 1 when assembly or decoding fails, and 2 on a usage
error.
.SH EXAMPLES
.nf
gasm dis k.s assemble, then list each function
gasm dis \-a amd64 \- < dump.bin disassemble raw bytes from stdin
.fi
.SH SEE ALSO
.BR gasm (1),
.BR gasm\-asm (1)