Enthernet Code
Enthernet Code
DIIDevHeads IoT Integration Server
Created by Marvee Amasi on 9/3/2024 in #middleware-and-os
Assembly Program on 64-bit OpenBSD Compiles Without Errors but Shows No Output
It seems like your assembly program isn't printing text because it might be missing the correct system calls. On Unix-like systems (like OpenBSD), printing to the console usually involves using the write system call. Here's a simple, complete assembly program that prints "Hello, World!" to the console you can use this as a guide 👇
.section .data
message: .asciz "Hello, World!\n"

.section .text
.global _start

_start:
mov $1, %rax
mov $1, %rdi
mov $message, %rsi
mov $13, %rdx
syscall

mov $60, %rax
xor %rdi, %rdi
syscall
.section .data
message: .asciz "Hello, World!\n"

.section .text
.global _start

_start:
mov $1, %rax
mov $1, %rdi
mov $message, %rsi
mov $13, %rdx
syscall

mov $60, %rax
xor %rdi, %rdi
syscall
4 replies