code::blocks 上如何编写Intel Style的Inline ASM??

kqqrr18 2014-03-15 05:46:08
如题,
我的代码
__asm
{

}
这样编写却失败了
怎解决?
...全文
149 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
menzi11 2014-04-12
  • 打赏
  • 举报
回复
哦对,再补充一下, 在GCC中添加"-masm=intel"就可以不用加".intel_syntax noprefix;"直接编写intel风格内联汇编了
menzi11 2014-03-15
  • 打赏
  • 举报
回复
想在AT&T的格式的asm块中使用intel格式的内联汇编...可以这样: asm ( ".intel_syntax noprefix;" "mov eax, _a;" //intel风格 "mov ecx, 3;" "mul ecx;" "mov _a, eax;" "mov rax,rcx;" "movupd xmm0,xmm2;" ....................................... ".att_syntax noprefix" ); 但是我不建议这样,现在反倒是ATT的看着舒服
Contents Preface i 1 Introduction 1 1.1 Information isBits inContext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2 Programs areTranslated byOtherPrograms intoDifferent Forms . . . . . . . . . . . . . . . 3 1.3 ItPays toUnderstandHowCompilation SystemsWork . . . . . . . . . . . . . . . . . . . . 4 1.4 Processors Read and Interpret Instructions Stored in Memory . . . . . . . . . . . . . . . . . 5 1.4.1 HardwareOrganization of aSystem . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.4.2 Running the helloProgram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.5 CachesMatter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.6 StorageDevicesFormaHierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.7 TheOperating SystemManages theHardware . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.7.1 Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.7.2 Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 1.7.3 Virtual Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 1.7.4 Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.8 SystemsCommunicateWithOtherSystemsUsingNetworks . . . . . . . . . . . . . . . . . 16 1.9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 I Program Structure and Execution 19 2 Representing and Manipulating Information 21 2.1 Information Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 2.1.1 HexadecimalNotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 2.1.2 Words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3 4 CONTENTS 2.1.3 DataSizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 2.1.4 Addres

65,208

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧