ASM [英] asm
问题描述
嘿大家......快问你。
我的印象是'asm''命令不是标准的一部分
C ++,因为所有的汇编语言指令都是机器相关的。
但是,我注意到在Stroustrup的语法附录中,实际列出了`asm''
命令。我实际上没有标准副本,
所以我只是想知道:
'asm''命令实际上是标准的一部分C ++ ??
*********************************** *************** ***
Josh Lessard
硕士学生
学校计算机科学学士
数学系
滑铁卢大学
(519)888-4567 x3400
http://www.cs.uwaterloo.ca
***** ********************************************* *** />
Hey everyone...quick question for you.
I was under the impression that the `asm'' command was not part of standard
C++ because all assembly language instructions are machine dependent.
However, I noticed that in the grammar appendix of Stroustrup, the `asm''
command is actually listed. I don''t actually have a copy of the standard,
so I was just wondering:
Is the `asm'' command actually part of standard C++??
************************************************** ***
Josh Lessard
Master''s Student
School of Computer Science
Faculty of Mathematics
University of Waterloo
(519)888-4567 x3400
http://www.cs.uwaterloo.ca
************************************************** ***
推荐答案
Josh Lessard写道:
Josh Lessard wrote:
大家好......快问你。
<我的印象是'asm''命令不是标准的C ++的一部分,因为所有汇编语言指令都是机器相关的。
但是,我注意到在Stroustrup的语法附录中, ` asm''
命令实际上已列出。我实际上并没有这个标准的副本,所以我只是想知道:
`asm''命令实际上是标准C ++的一部分??
Hey everyone...quick question for you.
I was under the impression that the `asm'' command was not part of standard
C++ because all assembly language instructions are machine dependent.
However, I noticed that in the grammar appendix of Stroustrup, the `asm''
command is actually listed. I don''t actually have a copy of the standard,
so I was just wondering:
Is the `asm'' command actually part of standard C++??
我的猜测是它是标准的一部分,它是*保留*用于
使用是特定于实现的。这要求符合条件的代码
不要使用asm。作为一个可能的标识符 - 因此导致支持asm的
实现的问题。
My guess is that it''s part of the standard in that it is *reserved* for
use that is implementation specific. This requires conforming code to
not use the "asm" as a possible identifier - thus causing problems for
implementations that do support asm.
Josh Lessard写道:
Josh Lessard wrote:
大家好......快问你。
我的印象是'asm''命令不是标准的C ++的一部分,因为所有汇编语言指令依赖于机器。
但是,我注意到在Stroustrup的语法附录中,实际列出了`asm''
命令。我实际上并没有这个标准的副本,所以我只是想知道:
`asm''命令实际上是标准C ++的一部分?
''asm''关键字是。据我所知,''命令''不是一个在
C ++中有任何意义的术语。这就是1997年11月
标准草案中关于''asm''的内容:
7.4 asm声明[dcl.asm]
1 asm声明的格式为
asm-definition:
asm(string-literal);
asm声明的含义是实现定义的。 [注意:
通常它用于通过实现将信息传递给
汇编程序。 ]
***************************************** ********* ***
Josh Lessard
硕士学生
计算机科学学院
数学系
滑铁卢大学< (519)888-4567 x3400
http://www.cs。 uwaterloo.ca
************************************* *********** ***
Hey everyone...quick question for you.
I was under the impression that the `asm'' command was not part of standard
C++ because all assembly language instructions are machine dependent.
However, I noticed that in the grammar appendix of Stroustrup, the `asm''
command is actually listed. I don''t actually have a copy of the standard,
so I was just wondering:
Is the `asm'' command actually part of standard C++??
The ''asm'' keyword is. ''Command'' is not a term that has any meaning in
C++, as far as I know. Here''s what the November 1997 draft of the
standard says about ''asm'':
7.4 The asm declaration [dcl.asm]
1 An asm declaration has the form
asm-definition:
asm ( string-literal ) ;
The meaning of an asm declaration is implementation-defined. [Note:
Typically it is used to pass information through the implementation to
an assembler. ]
************************************************** ***
Josh Lessard
Master''s Student
School of Computer Science
Faculty of Mathematics
University of Waterloo
(519)888-4567 x3400
http://www.cs.uwaterloo.ca
************************************************** ***
你认为你可以将你的签名修剪到合理的长度(4行或
)
so),并试图说服你的新闻客户使用正确的sig分隔符
(破折号空格)?
-Kevin
-
我的电子邮件地址有效,但会定期更改。
要联系我,请使用最近发布的地址。
Do you think you could trim your sig to a reasonable length (4 lines or
so), and try to convince your news client to use a proper sig delimiter
(dash-dash-space)?
-Kevin
--
My email address is valid, but changes periodically.
To contact me please use the address from a recent posting.
" Josh Lessard" < JR ****** @ plg2.math.uwaterloo.ca>在留言中写道
新闻:Pi ************************************ * @ PLG2。 math.uwaterloo.ca ...
"Josh Lessard" <jr******@plg2.math.uwaterloo.ca> wrote in message
news:Pi*************************************@plg2. math.uwaterloo.ca...
嘿大家......快问你。
我的印象是'asm''命令不属于标准的C ++因为所有汇编语言指令都依赖于机器。
但是,我注意到在Stroustrup的语法附录中,实际列出了`asm''
命令。我实际上并没有这个标准的副本,所以我只是想知道:
`asm''命令实际上是标准C ++的一部分??
Hey everyone...quick question for you.
I was under the impression that the `asm'' command was not part of standard
C++ because all assembly language instructions are machine dependent.
However, I noticed that in the grammar appendix of Stroustrup, the `asm''
command is actually listed. I don''t actually have a copy of the standard,
so I was just wondering:
Is the `asm'' command actually part of standard C++??
首先请注意,C ++没有''命令''。
那么让我们来看看标准:
-----------------------------------------
ISO / IEC 14882:1998(E)
7.4 asm声明
1 asm声明的格式为
asm * -definition:
asm(string * -literal);
asm声明的含义是实现* -defined。
[注意:通常它用于通过
实现将信息传递给汇编程序。 ]
------------------------------------- ----
因此''asm''关键字确实是标准的,但它的实现
必然是平台/实现特定的。这与''std :: system()''函数类似,这是标准的,但其
参数是特定于平台/实现的。
-Mike
First note that C++ has no ''commands''.
Then let''s look at the standard:
-----------------------------------------
ISO/IEC 14882:1998(E)
7.4 The asm declaration
1 An asm declaration has the form
asm*-definition:
asm ( string*-literal ) ;
The meaning of an asm declaration is implementation*-defined.
[Note: Typically it is used to pass informa*tion through the
implementation to an assembler. ]
-----------------------------------------
So the ''asm'' keyword is indeed standard, but it''s implementation
is necessarily platform/implementation-specific. This is similar
to the ''std::system()'' function, which is standard, but whose
argument is platform/implementation-specific.
-Mike
这篇关于ASM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!