public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Inline Assemby
@ 2001-03-20 11:39 Doran, Steve @ OS
  0 siblings, 0 replies; 2+ messages in thread
From: Doran, Steve @ OS @ 2001-03-20 11:39 UTC (permalink / raw)
  To: 'gcc-help@gcc.gnu.org'

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 470 bytes --]

Title: Inline Assemby





I am somewhat confused about how to embed inline assembly in a
gcc program. Below is my simple assembly instructions:


    in   al, E0h
    or   al, 01h
    out E0h, al


What is the syntax to insert my assembly instructions in gcc? I have
read the gcc manual and I have tried all sorts of iterations without succcess.


BTW, I have a requirement to port the assembly so I cannot convert it into C.





^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: Inline Assemby
@ 2001-03-20 22:47 David Korn
  0 siblings, 0 replies; 2+ messages in thread
From: David Korn @ 2001-03-20 22:47 UTC (permalink / raw)
  To: 'Doran, Steve @ OS', 'gcc-help@gcc.gnu.org'

-----Original Message-----
From: Doran, Steve @ OS [ mailto:Steve.Doran@OS.L-3com.com ]
Sent: 20 March 2001 19:37

>I am somewhat confused about how to embed inline assembly in a 
>gcc program. Below is my simple assembly instructions: 
>    in   al, E0h 
>    or   al, 01h 
>    out E0h, al 
>what is the syntax to insert my assembly instructions in gcc? I have 
>read the gcc manual and I have tried all sorts of iterations without 
>succcess. 

http://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc_4.html#SEC93

>BTW, I have a requirement to port the assembly so I cannot convert it into
>C. 

  Or perhaps you could break the assembly code out into a separate
function and put it in a .S file ?

     DaveK
--
 All your base are belong to us!


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-03-20 22:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-20 11:39 Inline Assemby Doran, Steve @ OS
2001-03-20 22:47 David Korn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).