commit 0672bcedffb5e604859c11a2e9caadaad7b8c91e Author: stickynotememo Date: Thu Dec 18 16:15:02 2025 +1100 Add stage 1: assembly diff --git a/src/1_assembly.S b/src/1_assembly.S new file mode 100644 index 0000000..c5520b7 --- /dev/null +++ b/src/1_assembly.S @@ -0,0 +1,18 @@ +global _1_assembly_func +section .text +; _start: mov rax, 1 ; system call for write + ; mov rdi, 1 ; file handle 1 is stdout + ; mov rsi, message ; address of string to output + ; mov rdx, 13 ; number of bytes + ; syscall ; invoke operating system to do the write + ; mov rax, 60 ; system call for exit + ; xor rdi, rdi ; exit code 0 + ; syscall ; invoke operating system to exit + +_1_assembly_func: + mov rax, message + ret + +section .data + +message: db "Hello from Assembly.", 21 ; note the newline at the end; Define variables in the data section