Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to use asm in C++?

0 views
Skip to first unread message

Hongkun Liang

unread,
Dec 30, 1998, 3:00:00 AM12/30/98
to
Hi, I want to write some lines in C++ by asm
command. But I don't know how to pass a variable
to the asm command.


Thanks!
 

Charles LaCour

unread,
Dec 30, 1998, 3:00:00 AM12/30/98
to
C++ questions should be asked in comp.lang.c++.
Hongkun Liang wrote in message <368A9FF3...@nd.edu>...
Message has been deleted

Martin Ambuhl

unread,
Jan 4, 1999, 3:00:00 AM1/4/99
to
Russell Harper wrote:
>
> [warning: off-topic!]
>
> asm is a reserved keyword in C, but its implementation is compiler and
> platform specific.


Could you please provide a reference to the standard for this
assertion? I doubt that you can do better than appendix G.5.10, but
this will hardly do, since the use of asm as a keyword "rendeers an
implementation nonconforming." 'asm' is NOT a reserved keyword in C.

--
Martin Ambuhl (mam...@earthlink.net)
Note: mam...@tiac.net will soon be inactive


Will Rose

unread,
Jan 5, 1999, 3:00:00 AM1/5/99
to
Russell Harper (rha...@intouchsurvey.com) wrote:
: [warning: off-topic!]

: asm is a reserved keyword in C, but its implementation is compiler and

: platform specific. If possible try doing a search for asm in the source
: files for the system for sample code. In most of the implementations I've
: seen, you shouldn't have to write the interface in assembler (e.g.):

asm isn't reserved in C89 - it might be in C9X, I don't know.


Will
c...@crash.cts.com


Martin Ambuhl

unread,
Jan 5, 1999, 3:00:00 AM1/5/99
to

It isn't. Its status in K.5.10 in n843 is the same G.5.10 of 9899:1990.
If your implementation makes it a keyword, you break legal code,
rendering your implementation non-conforming.

Russell Harper

unread,
Jan 5, 1999, 3:00:00 AM1/5/99
to
I'm using The C Programming Language K&R 2nd ed. (I know it's not the 'real'
reference, but it's good enough for me). Appendix A2.4 "Keywords" where it
says that "Some implementations also reserve the words fortran and asm.", so
I guess I'm not 100% correct. I won't be losing any sleep over it though.
/Russell

Martin Ambuhl wrote ...
...


>Could you please provide a reference to the standard for this
>assertion? I doubt that you can do better than appendix G.5.10, but
>this will hardly do, since the use of asm as a keyword "rendeers an
>implementation nonconforming." 'asm' is NOT a reserved keyword in C.

...

0 new messages