From f1328af5d6006f5c97e716118c82930219780a22 Mon Sep 17 00:00:00 2001 From: "Elf M. Sternberg" Date: Wed, 25 Apr 2018 08:41:35 -0700 Subject: [PATCH] Working and commented. --- hello32.s | 10 +++++----- hello64.s | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hello32.s b/hello32.s index afdaee5..f9d5a30 100755 --- a/hello32.s +++ b/hello32.s @@ -3,7 +3,7 @@ ;; Link with: ld -m elf_i386 -o hello hello.o ;; Run with: ./hello - ;; sys/syscall.h + ;; sys/unistd_32.h %define SYS_write 4 %define SYS_exit 1 @@ -17,14 +17,14 @@ section .text global _start _start: - mov edx, 26d ; Length of the message - mov ecx, msg ; Address of the message + mov edx, 26d ; Length of the message. The 'd' means 'decimal' + mov ecx, msg ; Address of the message (not the content) mov ebx, STDOUT ; using STDOUT (see definition above) mov eax, SYS_write ; Using WRITE in 32-bit mode? - int 80h + int 80h ; Interrupt target. The 'h' means 'hexidecimal' mov ebx, 0 mov eax, SYS_exit - int 80h + int 80h diff --git a/hello64.s b/hello64.s index 95d64b5..04d0195 100644 --- a/hello64.s +++ b/hello64.s @@ -3,7 +3,7 @@ ;; Link with: ld -m elf_i386 -o hello hello.o ;; Run with: ./hello - ;; sys/syscall.h + ;; sys/unistd_64.h %define SYS_write 1 %define SYS_exit 60