Document x86 assembly examples

This commit is contained in:
dwrz
2026-10-27 12:41:06 +00:00
parent 724b6988db
commit 695a79e106
2 changed files with 18 additions and 4 deletions
+4
View File
@@ -3,10 +3,14 @@
_start:
# Store system call 1 in the EAX register.
# mov = instruction
# $1, %eax = operands
# %eax = register
mov $1, %eax
# Store the exit code 0 in the EBX register.
mov $0, %ebx
# Call interrupt handler 0x80 (128) -- on Linux, this is the kernel.
# Kernel will take over and see 1 in %eax, 0 in %ebx.
int $0x80