TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: MR. MAN-WAI CHANG
from: DRUCK
date: 2018-03-06 13:53:00
subject: Re: Compile Assembly and

On 06/03/18 11:20, Mr. Man-wai Chang wrote:
> On 6/3/2018 00:23, Ilias Abrams wrote:
>> Hi guys, can a kindly soul explain to me how I can compile a .c file 
>> with an .asm file together on a RPI 2?  I have an assembly file that I 
>> am calling a function through a C code.  What I need to do now so I 
>> can combine and compile both files togethe
> 
> You talking about inline Assembly? You could the ASM compiler directive?
> 
> Or a makefile including an external ASM source file? The latter scenario 
> needs an external assembly compiler.

The easiest way to do the latter, is to write a C stub for the function 
which you wish to write in assembler, then compile this with gcc -S to 
produce a template asm file with the correct register bindings which you
can then fill out.

---druck

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.