Moving and consolidating repos

This commit is contained in:
klein panic
2025-04-14 17:05:27 -04:00
parent 0529e3c972
commit 3a7f7e1e13
36 changed files with 799 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
nasm -f elf64 -o output.o input.asm
ld input.o -o binary

BIN
x86_64/Hello/hello34 Executable file

Binary file not shown.

18
x86_64/Hello/hello34.asm Normal file
View File

@@ -0,0 +1,18 @@
section .data
hello db "Hello, World!", 10 ; The string to print, with a new line terminator
section .text
global _start ; The entry point for the program
_start:
; Write the string to stdout
mov eax, 4 ; sys_write system call number
mov ebx, 1 ; File descriptor (stdout)
mov ecx, hello ; Pointer to the string
mov edx, 13 ; Length of the string
int 0x80 ; Call the kernel
; Exit the program
mov eax, 1 ; sys_exit system call number
xor ebx, ebx ; Exit code 0
int 0x80 ; Call the kernel

BIN
x86_64/Hello/hello34.o Normal file

Binary file not shown.

BIN
x86_64/Hello/hello64 Executable file

Binary file not shown.

16
x86_64/Hello/hello64.asm Normal file
View File

@@ -0,0 +1,16 @@
section .data
hello db "Hello, World!", 10 ; Declared bits with a new line term (10)
section .text
global _start
_start:
mov rax, 1
mov rdi, 1
mov rsi, hello
mov rdx, 14
syscall
mov rax, 60
mov rdi, 0
syscall

BIN
x86_64/Hello/hello64.o Normal file

Binary file not shown.

BIN
x86_64/Hello/hello64_exe Executable file

Binary file not shown.

BIN
x86_64/Hello/hello64_exe.o Normal file

Binary file not shown.