Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Mar 2005 05:02:33 +0000
From:      Joseph Koshy <joseph.koshy@gmail.com>
To:        klowd9 - <klowd92@hotmail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Freebsd Asm
Message-ID:  <84dead72050310210226f2ca9c@mail.gmail.com>
In-Reply-To: <BAY10-F421B664A0D3A627CAE5B3EBF530@phx.gbl>
References:  <BAY10-F421B664A0D3A627CAE5B3EBF530@phx.gbl>

next in thread | previous in thread | raw e-mail | index | archive | help
> I already visited int80h.org and linuxassembly.org and others, And did not
> find any resources or include files..
> If anyone can share his own files, or give any tips, would be nice.

It is straightforward:

The assembly syntax is whatever is supported by gas(1) for
your architecture.  'info gas' should be of help.

The BSD make(1) infrastructure supports creating objects from
assembler sources; just name your assembler files with a
.S or .s suffix and include these names in your 'SRCS'
make variable.

Files with a ".S" suffix are preprocessed by cpp(1) before 
being fed into the assembler.  Files with a ".s" suffix are
fed into the assembler without preprocessing.  See 
"src/share/mk/sys.mk".

There are some convenient CPP macros for assembly language
programmers in <machine/asm.h> and <machine/asmacros.h>.

You can also study the assembly sources under "src/lib/libc/*".

-- 
FreeBSD Volunteer, http://people.freebsd.org/~jkoshy



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?84dead72050310210226f2ca9c>