GAS x64 GNU Assembler output tutorial in Linux

Опубликовано: 15 Март 2026
на канале: Leave Knowledge
7,287
90

GAS x64 GNU Assembler output and executable tutorial in Linux

output.asm-)
.global _start
.data
hello:.string "hello\n"
.text
_start:
mov $1,%rax
mov $1,%rdi
mov $hello,%rsi
mov $7,%rdx
syscall
mov $60,%rax
mov $0,%rdi
syscall
(-output.asm

terminal-)
as -o output.o output.asm
ld -o output output.o
./output
(-terminal

=hello