FreeBSD assembly - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

FreeBSD assembly

nub111nub111 Posts: 1Member
Hello everyone,

I am tring to learn assembly for freeBSD so I
started reading the following tut and tried to
write a char to the screen using a write syscall.
my code is:
push 1 ; the size
push address ; the buffer address
push 1 ; output stream
mov eax,4 ; the write syscall id
int 80H ; call the kernel
add esp,12
it didnt work, so i wrote the exact thing in C
using the syscall function and it worked.
then i tried to copy the code from the tut and it didnt work.
I am using nasm to compile the code.
nasm -f elf test.asm
and FreeBSD 5.1-release OS.
What am i doing wrong.


Sign In or Register to comment.