Moving and consolidating repos
This commit is contained in:
2
x86_64/Hello/assemble.txt
Normal file
2
x86_64/Hello/assemble.txt
Normal 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
BIN
x86_64/Hello/hello34
Executable file
Binary file not shown.
18
x86_64/Hello/hello34.asm
Normal file
18
x86_64/Hello/hello34.asm
Normal 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
BIN
x86_64/Hello/hello34.o
Normal file
Binary file not shown.
BIN
x86_64/Hello/hello64
Executable file
BIN
x86_64/Hello/hello64
Executable file
Binary file not shown.
16
x86_64/Hello/hello64.asm
Normal file
16
x86_64/Hello/hello64.asm
Normal 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
BIN
x86_64/Hello/hello64.o
Normal file
Binary file not shown.
BIN
x86_64/Hello/hello64_exe
Executable file
BIN
x86_64/Hello/hello64_exe
Executable file
Binary file not shown.
BIN
x86_64/Hello/hello64_exe.o
Normal file
BIN
x86_64/Hello/hello64_exe.o
Normal file
Binary file not shown.
Reference in New Issue
Block a user