Article View: gnu.gcc.help
Article #54236asm help
From: Jim Mintha
Date: Mon, 17 Dec 1990 08:29
Date: Mon, 17 Dec 1990 08:29
20 lines
1488 bytes
1488 bytes
I have been trying to use the 'asm' command in GNU C but I can't seem
to figure it out. The only documentation I can seem to find is in the info
under extensions, which describes how to use 'C' variables in the assembly
instructions.
What I would like to do is use labels as well. I've been trying
something like the following:
asm("movel %0,d0" :: "d",(ctr)); /* number of interations */
asm("loop: movel #45,a0"); /* copy a value to a location */
asm("dbf d0,loop"); /* decrement the counter, and loop */
Is there a proper way to use labels, or do I have to figure out the branches
by hand?
--
-------------------------------------------------------------------------------
Jim Mintha University of British Columbia
Programming Assistant Geography Department
e-mail: mintha@geog.ubc.ca Vancouver, B.C.
Technical Details
Message-ID:
<1990Dec17.082941.10378@unixg.ubc.ca>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!sunic!uupsi!rpi!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!unixg.ubc.ca!loon.ubc.ca!minthaShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,820f1fdca3b5988c,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1990-12-17 00:29:41 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!sunic!uupsi!rpi!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!unixg.ubc.ca!loon.ubc.ca!mintha From: mintha@loon.ubc.ca (Jim Mintha) Newsgroups: gnu.gcc.help Subject: asm help Keywords: asm Message-ID: <1990Dec17.082941.10378@unixg.ubc.ca> Date: 17 Dec 90 08:29:41 GMT Sender: news@unixg.ubc.ca (Usenet News Account) Organization: University of British Columbia, Vancouver, B.C., Canada Lines: 20