🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #42477

Insert the assembly code ...

#42477
From: Haiying CAI
Date: Tue, 05 Dec 1995 00:00
27 lines
1044 bytes
Hello,

I have a quick question:

How to insert the assembly code in the C program?

I am using the gcc on SPARC and I want to insert the assembly code to
my C program, but I don't have the reference manual, I have tried
something like that:
	i=1;
	asm mov %o1, %o2
	j=i;
or:
	i=1;
	{asm mov %o1, %o2}
	j=i;

but cannot passed the parsing.

What's the correct format?

--Haiying
-- 
    +-+--+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+
        Haiying Cai 	    \   Home Page= http://www.cs.mcgill.ca/~cai
        cai@cs.mcgill.ca   	\  Finger me and say hello! 
    +-+-+-+--+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
Technical Details
Message-ID: <4a0dl0$9qk@sifon.cc.mcgill.ca>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,1e31ed35b459ebf7
X-Google-Attributes: gid11318c,public
From: cai@cs.mcgill.ca (Haiying CAI)
Subject: Insert the assembly code ...
Date: 1995/12/05
Message-ID: <4a0dl0$9qk@sifon.cc.mcgill.ca>
X-Deja-AN: 121175734
organization: SOCS, McGill University, Montreal, Canada
newsgroups: gnu.gcc.help