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.
I am tring to learn assembly for freeBSD so I
started reading the following tut http://www.int80h.org/bsdasm/
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
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.
0 · ·