FreeBSD assembly - Programmers Heaven

Howdy, Stranger!

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


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.