Freebsd Asm

Ryan Sommers ryans at gamersimpact.com
Thu Mar 10 21:02:51 PST 2005


klowd9 - wrote:
> If anyone can share his own files, or give any tips, would be nice.

You aren't going to find many, if any, userland include files for 
assembly. The system is designed to be very portable and assembly is not.

My first response, and likely that of anyone else, would be what are you 
doing that it needs to be done in assembly? If all you are looking for 
is some experience working with assembly then that's fine; there are a 
lot of good guides out there that teach the basics. Otherwise though if 
you're looking to get into developing on FreeBSD I'd recommend sticking 
with a higher level language.

I think I remember a few guides out there on doing assembly on FreeBSD, 
can't remember them off the top of my head though. Honestly, coming from 
someone that went through that learning curve, a good ol copy of MSDOS 
can be a better teaching aid than doing assembly on a modern OS. I 
imagine almost every modern OS running on x86 will run in protected mode 
and therefore somewhat shield you from getting down and dirty with the 
processor. Using DOS will let you mess around with entering protected 
mode and other things.

Another note, careful about using Linux guides on FreeBSD. Specifically 
be careful when it comes to system calls. Linux, like Windows, uses 
registers for passing arguments to syscalls, extras spill onto the 
stack, FreeBSD however passes all parameters on the stack.

-- 
Ryan Sommers
ryans at gamersimpact.com


More information about the freebsd-hackers mailing list