je

if equal then jmp

jg

if the second gt the first, then jmp

jge

if the second ge the first, then jmp

jl

if the second lt the first, then jmp

jle

if the second le the first, then jmp

AT&T 64-bit assembly

how to call library like printf?

The code shows the AT&T assembly on 64-bit Linux.

We use syscall instead of int 0x80.

We save parameters in registers before calling printf, instead of pushing the parameters on the stack.

This is the key:

How to debug assembly program on Linux ?

using gdb

as xx.s -gstabs -o xx.o      -gstabs is necessary,otherwise

commands:

run, next, info registers, break num(line number), quit

how to exit program rightly:

movq 1,%rax

int $0x80

AT&T Assembly on Linux的更多相关文章

  1. Linux C中内联汇编的语法格式及使用方法(Inline Assembly in Linux C)【转】

    转自:http://www.linuxidc.com/Linux/2013-06/85221p3.htm 阅读Linux内核源码或对代码做性能优化时,经常会有在C语言中嵌入一段汇编代码的需求,这种嵌入 ...

  2. AT&T ASSEMBLY FOR LINUX AND MAC (SYS_FORK)

    Fork() in C: (sys_fork.c) #include <stdio.h> #include <stdlib.h> #include <unistd.h&g ...

  3. AT&T Assembly for Linux and Mac (sys_write)

    Write() in C : (sys_write.c) #include <stdio.h> int main(void) { printf("Hello Landpack\n ...

  4. AT&T Assembly for Linux and Mac (sys_exit)

    Exit() in C : (sys_exit.c) int main(void) { ; } Exit() in AT&T for Linux: (sys_exit.s) .section ...

  5. 【Linux学习笔记】Linux C中内联汇编的语法格式及使用方法(Inline Assembly in Linux C)

    http://blog.csdn.net/slvher/article/details/8864996 https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm. ...

  6. An Assembly Language

    BUFFER OVERFLOW 3 An Assembly Language Introduction Basic of x86 Architecture Assembly Language Comp ...

  7. Linux 驱动开发

    linux驱动开发总结(一) 基础性总结 1, linux驱动一般分为3大类: * 字符设备 * 块设备 * 网络设备 2, 开发环境构建: * 交叉工具链构建 * NFS和tftp服务器安装 3, ...

  8. intel汇编笔记

    另一篇汇编学习笔记AT&T Assembly on Linux  (linux下) mov ax,bx     bx到ax 读数据过程:cpu通过地址线发送地址a,控制线向存储器发送读命令,存 ...

  9. Linux+Mono+WebService:CS1703: An assembly with the same identity--mscorlib

    最近把一些东西开始往Linux迁移了,因为老系统大部分都是.NET,所以直接使用Mono,代码一般都使用MonoDevelop把代码重新编译,把一些WMI和windows DLL调用改Linux的os ...

随机推荐

  1. 由React学习到Yeoman安装以及遇到的问题

    离职闲下来之后想着学一些新知识,本来是想从react入手,结果延伸出去的内容就像一棵树的树枝,不断增加. 学习计划是从这里开始的(6周学习计划,攻克javascript难关 https://zhuan ...

  2. 检查或遍历android手机应程

    检查android手机中是否存在某应程 public boolean checkApp(String packageName) {        if (packageName == null || ...

  3. 前端开发面试知识点大纲--摘自jackyWHJ

    前端开发面试知识点大纲:HTML&CSS:    对Web标准的理解.浏览器内核差异.兼容性.hack.CSS基本功:布局.盒子模型.选择器优先级及使用.HTML5.CSS3.移动端适应 Ja ...

  4. Java正则表达式的解释说明

    1.字符x    字符 x.例如a表示字符a\\    反斜线字符.在书写时要写为\\\\.(注意:因为java在第一次解析时,把\\\\解析成正则表达式\\,在第二次解析时再解析为\,所以凡是不是1 ...

  5. hdu 1181(DFS)变 形 课

    变形课 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others)Total Submis ...

  6. win7下matplotlib安装(64位)

    前段时间爬了一些数据,想着以后要将数据的分析结果什么的展示出来,就想着下个MATLAB,某天在微信上的一篇文章发现matplotlib库,是用于Python的一个不错的图形化库,就想着装上耍耍.不过安 ...

  7. java程序操作Geometry对象

    Geometry 空间地理对象,Oracle中存储Geometry对象的字段类型是 MDSYS.SDO_GEOMETRY,在数据库中构建Geometry对象的方法: v_pointarray MDSY ...

  8. rdc21n(研发与设计综合讨论)博客开通了!

    rdc21n是“Research and Design Comprehensive discussioN”,其中21表示Comprehensive discussioN中间的21个字母(不包含空格), ...

  9. js 监听输入框输入事件兼容ie7

    $(element).bind("input propertychange",function(){});

  10. JavaScript 基础第二天

    一.前言 感觉昨天的内容确实是有点细碎.复杂.感觉是没有书上写的那么的细致而且有导入性,但是我还是喜欢这样只说干货.今天的内容将继续接着昨天最后的内容JS中的语言结构继续讲解并且重点讲解一下其中的内容 ...