Address operand syntax

There are up to 4 parameters of an address operand that are presented in the syntax displacement(base register, offset register, scalar multiplier). This is equivalent to [base register + displacement + offset register * scalar multiplier] in Intel syntax. Either or both of the numeric, and either of the register parameters may be omitted:

movl    -4(%ebp, %edx, 4), %eax  # Full example: load *(ebp - 4 + (edx * 4)) into eax
movl -4(%ebp), %eax # Typical example: load a stack variable into eax
movl (%ecx), %edx # No offset: copy the target of a pointer into a register
leal 8(,%eax,4), %eax # Arithmetic: multiply eax by 4 and add 8
leal (%eax,%eax,2), %eax # Arithmetic: multiply eax by 2 and add eax (i.e. multiply by 3) 實際 Kernel 上應用
call _sys_call_table(,%eax,4)
在linux环境下info gcc-  C Extensions:: 在里面找到Extended Asm::章节即可,《深入理解计算系统》相关章节也有介绍。
 
 
 

TOP

   

 

 
这个等价于call_sys_call_table[%eax].
只是省略了基地址而已,所以在“,”之前是空的。
寻址格式(base_address, index, indexscale),其中indexscale也就是一个entry在表中占几个字节。
你只需要看Professional Assembly Language这本书就可以了。

[Fw] assembly code in gas syntax的更多相关文章

  1. GAS Syntax

    GAS or GNU as syntax is a different form of syntax for assembly language files, known also as AT& ...

  2. Windbg Assembly Code(反汇编)窗口的使用

    在WinDbg中,可以通过输入命令(u, ub, uu (Unassemble))或使用反汇编窗口查看程序汇编代码. 如何打开 DissAssembly Code窗口 通过菜单View-->Di ...

  3. about loops in assembly code

    总结: 实际上只有一种结构,都是 do-while 结构

  4. Machine code transfer into assembly code

    #include <stdio.h> const char shell[]="\x0f\x01\xf8\xe8\5\0\0\0\x0f\x01\xf8\x48\xcf" ...

  5. Beennan的内嵌汇编指导(译)Brennan's Guide to Inline Assembly

    注:写在前面,这是一篇翻译文章,本人的英文水平很有限,但内嵌汇编是学习操作系统不可少的知识,本人也常去查看这方面的内容,本文是在做mit的jos实验中的一篇关于内嵌汇编的介绍.关于常用的内嵌汇编(AT ...

  6. [转]Whirlwind Tour of ARM Assembly

    ref:http://www.coranac.com/tonc/text/asm.htm 23.1. Introduction Very broadly speaking, you can divid ...

  7. Linking code for an enhanced application binary interface (ABI) with decode time instruction optimization

    A code sequence made up multiple instructions and specifying an offset from a base address is identi ...

  8. An Assembly Language

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

  9. Boosting Static Representation Robustness for Binary Clone Search against Code Obfuscation and Compiler Optimization(一)

    接着上一篇,现在明确问题:在汇编克隆搜索文献中,有四种类型的克隆[15][16][17]:Type1.literally identical(字面相同):Type2.syntactically equ ...

随机推荐

  1. vue下超级滚动条perfect-scrollbar(在特定框架里使用一款并非为该框架定制的库/插件)

    点我查看

  2. myeclipse2014删除antlr-2.7.2.jar--解决struts和hibernate包冲突

    方式一: 要求眼疾手快,在workspace下的D:\myeclipse2014workspace\.metadata\.me_tcat7\webapps\工程名\WEB-INF\lib中将antlr ...

  3. Git --05 Gitlab使用

    目录 Gitlab使用 01. 外观配置 02. Gitlab汉化配置 03. 注册限制 04. 创建用户及组 05. 创建用户 06. 把用户添加到组 07. 创建项目 08. 推送代码到Gitla ...

  4. python 中 len()和range()

    https://blog.csdn.net/qq_36357820/article/details/77850841

  5. hive基础知识or基本操作命令

    MySQL的密码是:123456 1.hive创建标准表(以后均可以按照这样创建): create [external] table [if not exists] records (year STR ...

  6. docker-compose.yml rabbitmq

    version: '3.1'services: mq: image: 'rabbitmq:management' restart: always ports: - '5672:5672' - '156 ...

  7. SpringBoot---Favicon配置

    1.概述 1.1.SpringBoot提供了一个默认的Favicon,每次访问都能看到: 2.关闭Favicon 在application.yml中设置关闭Favicon,默认开启: spring.m ...

  8. vue中v-model详解

    vue中经常使用到<input>和<textarea>这类表单元素,vue对于这些元素的数据绑定和我们以前经常用的jQuery有些区别.vue使用v-model实现这些标签数据 ...

  9. C#基础提升系列——C# LINQ

    C# LINQ LINQ(Language Integrated Query,语言集成查询).在C# 语言中集成了查询语法,可以用相同的语法访问不同的数据源. 命名空间System.Linq下的类En ...

  10. JavaScript之BOM+DOM

    BOM 浏览器对象模型, 用于把浏览器相关的组件封装为对象进行操作. BOM是包含了DOM的. window对象 弹出框相关 确认: 取消: 与打开关闭window有关的方法 定时器相关 暂停选老婆 ...