zoukankan      html  css  js  c++  java
  • oracle汇编01

    1: / define numeric label "1"
    one: / define symbolic label "one"
    / ... assembler code ...
    jmp 1f / jump to first numeric label "1" defined
    / after this instruction
    / (this reference is equivalent to label "two")
    jmp 1b / jump to last numeric label "1" defined
    / before this instruction
    / (this reference is equivalent to label "one")
    1: / redefine label "1"
    two: / define symbolic label "two"
    jmp 1b / jump to last numeric label "1" defined
    / before this instruction
    / (this reference is equivalent to label "two")

    2.There are fve classes of tokens:

    Identifers (symbols)

    Keywords

    Numerical constants

    String Constants

    Operators 

    3.An x86 instruction statement can consist of four parts:

    Label (optional)
    Instruction (required)
    Operands (instruction specifc)
    Comment (optional)

    4.Possible operand types and their instruction sufxes are:b Byte (8–bit)w Word (16–bit)

    l Long (32–bit) (default)
    q Quadword (64–bit)

    5.Only jump and call
    instructions can use indirect operands.
    Immediate operands are prefxed with a dollar sign ($) (ASCII 0x24)
    Register names are prefxed with a percent sign (%) (ASCII 0x25)
    Memory operands are specifed either by the name of a variable or by a register that contains
    the address of a variable. A variable name implies the address of a variable and instructs the
    computer to reference the contents of memory at that address. Memory references have the
    following syntax:
    segment:offset(base, index, scale).

    Segment is any of the x86 architecture segment registers. Segment is optional: if specifed,

    it must be separated from offset by a colon (:). If segment is omitted, the value of %ds (the
    default segment register) is assumed.
    Offset is the displacement from segment of the desired memory value. Offset is optional.Base and index can be any of the general 32–bit number registers.Scale is a factor by which index is to be multipled before being added to base to specify

    the address of the operand. Scale can have the value of 1, 2, 4, or 8. If scale is not specifed,
    the default value is 1.
    movl var, %eax
    -->Move the contents of memory location var
    into number register %eax.
    movl %cs:var, %eax
    -->Move the contents of memory location var
    in the code segment (register %cs) into
    number register %eax.
    movl $var, %eax
    -->Move the address of var into number
    register %eax.
    movl array_base(%esi), %eax
    -->Add the address of memory location
    array_base to the contents of number
    register %esi to determine an address in
    memory. Move the contents of this address
    into number register %eax.
    movl (%ebx, %esi, 4), %eax
    -->Multiply the contents of number register
    %esi by 4 and add the result to the contents
    of number register %ebx to produce a
    memory reference. Move the contents of
    this memory location into number register
    %eax.

    movl struct_base(%ebx, %esi, 4), %eax
    -->Multiply the contents of number register
    %esi by 4, add the result to the contents of
    number register %ebx, and add the result to
    the address of struct_base to produce an
    address. Move the contents of this address
    into number register %eax.
















  • 相关阅读:
    selenium—用NoSuchElementException异常判断页面元素是否存在
    CentOS7 Nginx安装及配置反向代理
    CentOS7 安装 jexus-5.8.2-x64
    Windows Server 2008 R2远程协助选项 灰色
    IIS8.5 Error Code 0x8007007e HTTP 错误 500.19的解决方法
    记一次 windows server 2012R2 上安装 MSSQL2005 及网站发布
    记一次《系统集成实施的相关知识》培训自己感悟
    MySql 远程连接的条件
    CentOS7 下安装mysql历程
    VirtualBox虚拟机网络设置(四种方式)
  • 原文地址:https://www.cnblogs.com/xpylovely/p/10935805.html
Copyright © 2011-2022 走看看