<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆 - 303  文章 - 883  trackbacks - 0
    <2007年12月>
    2526272829301
    2345678
    9101112131415
    16171819202122
    23242526272829
    303112345

    歡迎光臨! 
    閑聊 QQ:1074961813

    隨筆分類(357)

    我管理的群

    公共blog

    • n維空間
    • Email : java3d@126.com 群 : 12999758

    參與管理的論壇

    好友的blog

    我的其他blog

    朋友的網站

    搜索

    •  

    最新評論

    From:
           http://asm.sourceforge.net/howto/Assembly-HOWTO.html
           http://www.janw.dommel.be/eng.html

    Install nasm frist,then you can use this code

    NASM (hello.asm)

    section .text                ;section declaration

                ;we must export the entry point to the ELF linker or
        global _start    ;loader. They conventionally recognize _start as their
                ;entry point. Use ld -e foo to override the default.

    _start:

    ;write our string to stdout

            mov     edx,len ;third argument: message length
            mov     ecx,msg ;second argument: pointer to message to write
            mov     ebx,1   ;first argument: file handle (stdout)
            mov     eax,4   ;system call number (sys_write)
            int     0x80    ;call kernel

    ;and exit

        mov    ebx,0    ;first syscall argument: exit code
            mov     eax,1   ;system call number (sys_exit)
            int     0x80    ;call kernel

    section .data                ;section declaration

    msg     db      "Hello, world!",0xa    ;our dear string
    len     equ     $ - msg                 ;length of our dear string


    please install the GAS before use the code

    .text                    # section declaration

                # we must export the entry point to the ELF linker or
        .global _start    # loader. They conventionally recognize _start as their
                # entry point. Use ld -e foo to override the default.

    _start:

    # write our string to stdout

        movl    $len,%edx    # third argument: message length
        movl    $msg,%ecx    # second argument: pointer to message to write
        movl    $1,%ebx        # first argument: file handle (stdout)
        movl    $4,%eax        # system call number (sys_write)
        int    $0x80        # call kernel

    # and exit

        movl    $0,%ebx        # first argument: exit code
        movl    $1,%eax        # system call number (sys_exit)
        int    $0x80        # call kernel

    .data                    # section declaration

    msg:
        .ascii    "Hello, world!\n"    # our dear string
        len = . - msg            # length of our dear string

    good luck !!


    地震讓大伙知道:居安思危,才是生存之道。
    posted on 2007-12-19 16:54 小尋 閱讀(616) 評論(2)  編輯  收藏 所屬分類: unix program

    FeedBack:
    # re: Linux Assembly 2007-12-19 20:50 jeasonzhao
    呵呵,背景的金魚還不錯啊,哈哈  回復  更多評論
      
    # re: Linux Assembly[未登錄] 2007-12-20 10:00 尋覓
    呵呵 圣誕節到了 不知道是否合適 先湊合著用吧!~~~  回復  更多評論
      
    主站蜘蛛池模板: 97青青草原国产免费观看| 亚洲成AV人片在线观看ww| 先锋影音资源片午夜在线观看视频免费播放| 亚洲va久久久久| 亚洲综合小说久久另类区| 在线亚洲97se亚洲综合在线| 日本一道高清不卡免费| 手机看黄av免费网址| 久久狠狠躁免费观看2020| 二个人看的www免费视频| 全部一级一级毛片免费看| 亚洲欧美成人一区二区三区| 亚洲欧洲日产国产最新| 亚洲av永久无码精品网站| 亚洲成A∨人片天堂网无码| 亚洲色偷偷av男人的天堂| 国产亚洲一区二区在线观看 | 国产亚洲精品无码成人| 亚洲国产精品专区在线观看| 日韩免费高清一级毛片在线| 成人免费午间影院在线观看| 青青在线久青草免费观看| 永久看日本大片免费35分钟| 久久青草免费91观看| 怡红院免费的全部视频| 国产一级黄片儿免费看| a级毛片免费观看在线| 亚洲美女人黄网成人女| 亚洲精选在线观看| 亚洲2022国产成人精品无码区| 亚洲成色WWW久久网站| 亚洲欧洲日产国码av系列天堂| 久久久久国产亚洲AV麻豆| 中文字幕第一页亚洲| 国产aⅴ无码专区亚洲av麻豆| 国产偷国产偷亚洲高清日韩| 曰韩亚洲av人人夜夜澡人人爽| 中文字幕在亚洲第一在线| 亚洲一区无码中文字幕| 无码乱人伦一区二区亚洲一| 久久亚洲私人国产精品|