CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
可用分押宝游戏火热进行中... 专题改版:Java Web 专题
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  VC/MFC >  基础类

请问各位大虾,用vc编写程序时如何在其中加入汇编代码?

楼主stickking()2003-06-01 11:46:45 在 VC/MFC / 基础类 提问

如题,谢谢! 问题点数:50、回复次数:2Top

1 楼imacih()回复于 2003-06-01 12:29:31 得分 30

__asm  
  Microsoft   Specific    
   
  __asm  
   
  assembly-language-instruction  
   
  __asm  
  {  
  assembly-language-instructions  
  }  
   
  If   used   without   braces,   the   __asm   keyword   means   that   the   rest   of   the   line   is   an   assembly-language   statement.   If   used   with   braces,   it   means   that   each   line   between   the   braces   is   an   assembly-language   statement.   For   compatibility   with   previous   versions,   _asm   is   a   synonym   for   __asm.  
   
  Since   the   __asm   keyword   is   a   statement   separator,   you   can   put   assembly   instructions   on   the   same   line.  
   
  For   related   information,   see   Assembler   (Inline)   Topics.    
   
  Note       Microsoft   C++   does   not   support   the   AT&T   C++   asm   keyword.  
   
  END   Microsoft   Specific  
   
  Example  
   
  //   Example   of   the   __asm   keyword  
  __asm                                     //   __asm   block  
  {  
        mov   eax,   01h  
        int   10h  
  }  
   
  __asm   mov   eax,   01h             //   Separate   __asm   lines  
  __asm   int   10h  
   
  //   Multiple   __asm   statements   on   a   line  
  __asm   mov   eax,   01h       __asm   int   10h  
  Top

2 楼SatanLi1982(红魔)回复于 2003-06-01 12:51:00 得分 20

__asm                                    
  {  
        mov   eax,   01h  
        int   10h  
  }  
   
  __asm   mov   eax,   01h            
  __asm   int   10hTop

相关问题

  • Windows是用VC+汇编写的吗?
  • VC++中怎样加入汇编代码?
  • 请问vc怎么把.exe反汇编成汇编代码?
  • tc++中的汇编代码改写为vc汇编代码时遇到问题。
  • 如何在VC中看CPP代码生成的汇编代码
  • 如何在VC中看CPP代码生成的汇编代码
  • 怎样把用vc编的程序反汇编成汇编代码
  • 编写的关于TCP/IP,WINSTOCK的源代码要不要用汇编?
  • 编写的关于TCP/IP,WINSTOCK的源代码要不要用汇编??
  • 如何在vc++中利用已有的大量汇编代码

关键词

  • c++
  • asm
  • braces
  • assembly
  • keyword
  • instructions
  • mov eax
  • statements
  • line
  • language

得分解答快速导航

  • 帖主:stickking
  • imacih
  • SatanLi1982

相关链接

  • Visual C++类图书
  • Visual C++类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
世纪乐知(北京)网络技术有限公司 版权所有, 京 ICP 证 020026 号
北京创新乐知广告有限公司 提供技术支持
Copyright © 2000-2007, CSDN.NET, All Rights Reserved
GongshangLogo