Chinaunix首页 | 论坛 | 博客
  • 博客访问: 8294125
  • 博文数量: 1413
  • 博客积分: 11128
  • 博客等级: 上将
  • 技术积分: 14685
  • 用 户 组: 普通用户
  • 注册时间: 2006-03-13 10:03
个人简介

follow my heart...

文章分类

全部博文(1413)

文章存档

2013年(1)

2012年(5)

2011年(45)

2010年(176)

2009年(148)

2008年(190)

2007年(293)

2006年(555)

分类:

2010-01-02 00:22:12

MSIL 汇编程序从 Microsoft 中间语言 (MSIL) 生成可移植可执行的 (PE) 文件。(有关 MSIL 的更多信息,请参见。)可以运行结果可执行文件(该文件包含 MSIL 和所需的元数据)以确定 MSIL 是否按预期执行。

这是在sharpdevelop中生成的最简单的hello,world,由此可窥一斑。

.assembly HelloWorld
{
}

.namespace ila1
{
    .class private auto ansi beforefieldinit MainClass
    {
        .method public hidebysig static void Main(string[] args) cil managed
        {
            .entrypoint
            .maxstack  1
            ldstr      "Hello World!"
            call       void [mscorlib]System.Console::WriteLine(string)
            ret
        }
    }
}

 

用MSIL可以直接生成PE格式的.exe文件,无需生成目标程序和链接,在命令行下面ilasm来生成程序。

阅读(1228) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~