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. 用css画一个倒三角

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  2. liunx-网络基础

    liunx 网络配置  ifconfig: ipconfig -a ;显示信息 ifconfig eth1 up //开启网络接口 ifconfig eth1 down //关闭网络接口 ifconf ...

  3. Git--07 Gitlab备份与恢复

    目录 Gitlab备份与恢复 01). 备份 02). 恢复 Gitlab备份与恢复 ​ 对gitlab进行备份将会创建一个包含所有库和附件的归档文件.对备份的恢复只能恢复到与备份时的gitlab相同 ...

  4. 第四章 走进jVM

    4.1字节码 java文件编译成字节码后由默认解释执行,热点代码编译执行.方法调用到一定程度的时候,进行JIT编译成机器码执行,后面直接运行JIT编译结果(机器码). 4.2类加载过程 加载链接初始化 ...

  5. mysql官网下载安装

    1.官网下载zip压缩文件 2.解压到指定文件夹 3.配置环境变量 4.新建my.ini 5.管理员权限打开cmd命令行,mysqld install mysql,mysql --initialize ...

  6. webstorm9.0.3 注册码

    William 45550-12042010 00001SzFN0n1bPII7FnAxnt0DDOPJA INauvJkeVJBuE5bqLEznccE4tet6tr RiyoMxDK8oDY93t ...

  7. python基础:4.请至少列举5个 PEP8 规范(越多越好)。

    1.变量命名规则: 不能与关键字重名,必须以数字字母下划线组成,且不能以数字开头 2.导包规则: # 推荐这样写 import random import sys # 不推荐这样写 import ra ...

  8. Scene Text Detection(场景文本检测)论文思路总结

    任意角度的场景文本检测论文思路总结共同点:重新添加分支的创新更突出场景文本检测基于分割的检测方法 spcnet(mask_rcnn+tcm+rescore) psenet(渐进扩展) mask tex ...

  9. 51nod 1661: 黑板上的游戏(sg函数 找规律)

    题目链接 先打一个sg函数的表,找找规律,发现sg函数可以递归求解 打表代码如下 #include<bits/stdc++.h> using namespace std; typedef ...

  10. c++ 预处理指令#define, #endif...

    常见的预处理指令有: # 空指令,无任何效果 # include 包含一个源代码文件 #define 定义宏 #undef 取消已定义的宏 #if 如果给定条件为真,则编译下面代码 #ifdef 如果 ...