1.到www,nasm.us下载nasm

2.解压并安装nasm

#tar -xzvf nasm-2.11.08.tar.gz

#cd nasm-2.11.08

#./configure

#make

#make install

3.编写第一个汇编程序

新建hello.asm文件夹并编写如下代码

section .data

msg     db      "Hello, world!",0xA    

len     equ     $ - msg

section .text

global _start

_start:

mov     eax,4

       mov     ebx,1

       mov     ecx,msg

       mov     edx,len

       int     0x80

       mov     eax,1

       xor     ebx,ebx

       int     0x80

section .data

msg     db      "Hello, world!",0xA    

len     equ     $ - msg

section .text

global _start

_start:

mov     eax,4

       mov     ebx,1

       mov     ecx,msg

       mov     edx,len

       int     0x80

       mov     eax,1

       xor     ebx,ebx

       int     0x80

section .data

msg     db      "Hello, world!",0xA   

len     equ     $ - msg

section .text

global _start

_start:

mov     eax,4

       mov     ebx,1

       mov     ecx,msg

       mov     edx,len

       int     0x80

       mov     eax,1

       xor     ebx,ebx

       int     0x80

section .data

msg     db      "Hello, world!",0xA   

len     equ     $ - msg

section .text

global _start

_start:

mov     eax,4

       mov     ebx,1

       mov     ecx,msg

       mov     edx,len

       int     0x80

       mov     eax,1

       xor     ebx,ebx

       int     0x80

section .data

msg     db      "Hello, world!",0xA    

len     equ     $ - msg

section .text

global _start

_start:

mov     eax,4

       mov     ebx,1

       mov     ecx,msg

       mov     edx,len

       int     0x80

       mov     eax,1

       xor     ebx,ebx

       int     0x80

section .data

msg     db      "Hello, world!",0xA   

len     equ     $ - msg

section .text

global _start

_start:

mov     eax,4

       mov     ebx,1

       mov     ecx,msg

       mov     edx,len

       int     0x80

       mov     eax,1

       xor     ebx,ebx

       int     0x80

section .data

msg     db      "Hello, world!",0xA   

len     equ     $ - msg

section .text

global _start

_start:

mov     eax,4

       mov     ebx,1

       mov     ecx,msg

       mov     edx,len

       int     0x80

       mov     eax,1

       xor     ebx,ebx

       int     0x80

section .data

msg     db      "Hello, world!",0xA   

len     equ     $ - msg

section .text

global _start

_start:

mov     eax,4

       mov     ebx,1

       mov     ecx,msg

       mov     edx,len

       int     0x80

       mov     eax,1

       xor     ebx,ebx

       int     0x80

section .data

msg     db      "Hello, world!",0xA    

len     equ     $ - msg

section .text

global _start

_start:

mov     eax,4

       mov     ebx,1

       mov     ecx,msg

       mov     edx,len

       int     0x80

       mov     eax,1

       xor     ebx,ebx

       int     0x80

section .data

msg     db      "Hello, world!",0xA   

len     equ     $ - msg

section .text

global _start

_start:

mov     eax,4

       mov     ebx,1

       mov     ecx,msg

       mov     edx,len

       int     0x80

       mov     eax,1

       xor     ebx,ebx

       int     0x80

4.编译并链接

#nasm -f elf64 hello.asm (linux是64位的,如果是32,请使用elf32)

#ld -s -o hello hello.o

#ls hello

5.运行程序

#./hello

Linux(Fedora)系统下配制8086汇编环境的更多相关文章

  1. linux ubuntu系统下,adb不是内部命令 (如何才能让adb命令可以使用)

    linux ubuntu系统下,adb不是内部命令 原文地址 linux ubuntu系统下,adb不是内部命令 解决方法: 1.sudo gedit ~/.bashrc 2.将下面的两句加到上面打开 ...

  2. Linux:Ubuntu下部署Web运行环境

    Linux:Ubuntu下部署Web运行环境 本次博客将会从三部分内容详述Ubuntu系统下Web运行环境的配置: 依次是:FTP服务器的搭建.MYSQL数据库的搭建.JDK的安装等. 参考文章如下: ...

  3. Ubuntu系统下搭建Python开发环境

    之前演示了在Windows中安装Pycharm,很简单.下面介绍一下如何在Ubuntu中安装Pycharm 1.更新Python至3.5.1,执行以下命令: sudo add-apt-reposito ...

  4. Linux(CentOS)系统下安装好apache(httpd)服务后,其他电脑无法访问的原因

    原文:Linux(CentOS)系统下安装好apache(httpd)服务后,其他电脑无法访问的原因 今天试了下在虚拟机上利用CentOS系统的yum命令安装好了httpd(apache2.4.6), ...

  5. Windows和Linux双系统下完美卸载linux

    装了Windows和linux双系统的朋友,在后期要删除linux是个比较头痛的问题,因为MBR已经被linux接管,本文的目的是如何在windows 和linux双系统下,简单,完美地卸载linux ...

  6. 在linux(deepin)系统下查看当前ip地址与用户名

    在linux(deepin)系统下查看当前ip地址与用户名 查看当前ip地址 方式一: hostname -I 方式二: ifconfig -a 如下图所示: 其中192.168.11.66即为当前系 ...

  7. linux CentOS 系统下如何将php和mysql命令加入到环境变量中

    在Linux CentOS系统上安装完php和MySQL后,为了使用方便,需要将php和mysql命令加到系统命令中,如果在没有添加到环境变量之前,执行“php -v”命令查看当前php版本信息时时, ...

  8. Linux系统下安装Angular2开发环境(Ubuntu16.0和deepin)

    说明下,以下过程都是在ubuntu16.0系统下,win系统环境下的安装过程更简单,基本上可以仿效此环境来,除了不用配置系统命令(win下自动可以),node安装是exe程序,一键安装.另外,这里面像 ...

  9. Linux系统下yum镜像源环境部署记录

    之前介绍了Linux环境下本地yum源配置方法,不过这个是最简单最基础的配置,在yum安装的时候可能有些软件包不够齐全,下面说下完整yun镜像源系统环境部署记录(yum源更新脚本下载地址:https: ...

随机推荐

  1. vue 父子组件 基础应用scrollball v-model sync

    # 组件之间通信 可以通过 v-model 子组件可以通过 改变数据来改变父组件的数组  * v-model  子组件需要接受value属性,需要出发this.$emit("input&qu ...

  2. gulp VS grunt

    前公司代码一直用grunt部署, 偶然了解gulp后:学习gulp并用gulp和grunt在一小项目中实践,对两者之间的用法及区别有所了解后总结这一篇小博文:本文根据实战的项目配置文件,简单讲解实现相 ...

  3. NLP(二十七)开放领域的三元组抽取的一次尝试

      当我写下这篇文章的时候,我的内心是激动的,这是因为,自从去年6月份写了文章利用关系抽取构建知识图谱的一次尝试 后,我就一直在试图寻找一种在开放领域能够进行三元组抽取的办法,也有很多读者问过我这方面 ...

  4. 后端程序员必备:书写高质量SQL的30条建议

    前言 本文将结合实例demo,阐述30条有关于优化SQL的建议,多数是实际开发中总结出来的,希望对大家有帮助. 1.查询SQL尽量不要使用select *,而是select具体字段. 反例子: sel ...

  5. MySQL 【进阶查询】

    数据类型介绍 整型 tinyint, # 占1字节,有符号:-128~127,无符号位:0~255 smallint, # 占2字节,有符号:-32768~32767,无符号位:0~65535 med ...

  6. hdu1224SPFA求最长路加上打印路径

    题目链接:http://icpc.njust.edu.cn/Problem/Hdu/1224/ 无负环. 代码如下: #include<bits/stdc++.h> using names ...

  7. 第十七周Java实验作业

    实验十七  线程同步控制 实验时间 2018-12-10 1.实验目的与要求 (1) 掌握线程同步的概念及实现技术: 多线程并发运行不确定性问题解决方案:引入线程同步机制,使得另一线程使用该方法,就只 ...

  8. 如何设置mysql远程访问

    如何设置mysql远程访问 Mysql默认是不可以通过远程机器访问的,通过下面的配置可以开启远程访问 在MySQL Server端: 执行mysql 命令进入mysql 命令模式, mysql> ...

  9. ArrayList 扩容 和 Vector

    public boolean add(E e) { ensureCapacityInternal(size + 1); // Increments modCount!! elementData[siz ...

  10. 第二次实验报告:使用 Packet Tracer 分析应用层协议

    个人信息: 姓名:倪晓东 班级:计算1811 学号:201821121020 1 实验目的 熟练使用Packet Tracer工具.分析抓到的应用层协议数据包,深入理解应用层协议,包括语法.语义.时序 ...