Assembler Directives

.align integer, pad
The .align directive causes the next data generated to be aligned modulo integer bytes.
Integer must be a positive integer expression and must be a power of 2. If specifed, pad is an
integer bye value used for padding. The default value of pad for the text section is 0x90
(nop); for other sections, the default value of pad is zero (0).

.ascii "string"
The .ascii directive places the characters in string into the object module at the current
location but does not terminate the string with a null byte (\0). String must be enclosed in
double quotes (") (ASCII 0x22). The .ascii directive is not valid for the .bss section.

.bcd integer
The .bcd directive generates a packed decimal (80-bit) value into the current section. The
.bcd directive is not valid for the .bss section.

.bss
The .bss directive changes the current section to .bss.

.bss symbol, integer
Defne symbol in the .bss section and add integer bytes to the value of the location counter
for .bss. When issued with arguments, the .bss directive does not change the current
section to .bss. Integer must be positive.

.byte byte1,byte2,...,byteN
The .byte directive generates initialized bytes into the current section. The .byte directive
is not valid for the .bss section. Each byte must be an 8-bit value.

.2byte expression1, expression2, ..., expressionN
Refer to the description of the .value directive.

.4byte expression1, expression2, ..., expressionN
Refer to the description of the .long directive.

.8byte expression1, expression2, ..., expressionN
Refer to the description of the .quad directive.

.comm name, size,alignment
The .comm directive allocates storage in the data section. The storage is referenced by the
identifer name. Size is measured in bytes and must be a positive integer. Name cannot be
predefned. Alignment is optional. If alignment is specifed, the address of name is aligned to
a multiple of alignment.

.data
The .data directive changes the current section to .data.

.double float
The .double directive generates a double-precision floating-point constant into the current
section. The .double directive is not valid for the .bss section.

.even
The .even directive aligns the current program counter (.) to an even boundary.

ext expression1, expression2, ..., expressionN
The .ext directive generates an 80387 80–bit floating point constant for each expression into
the current section. The .ext directive is not valid for the .bss section.

.file "string"
The .file directive creates a symbol table entry where string is the symbol name and
STT_FILE is the symbol table type. String specifes the name of the source fle associated with
the object fle

.float float
The .float directive generates a single-precision floating-point constant into the current
section. The .float directive is not valid in the .bss section.

.globl symbol1, symbol2, ..., symbolN
The .globl directive declares each symbol in the list to be global. Each symbol is either
defned externally or defned in the input fle and accessible in other fles. Default bindings
for the symbol are overridden. A global symbol defnition in one fle satisfes an undefned
reference to the same global symbol in another fle. Multiple defnitions of a defned global
symbol are not allowed. If a defned global symbol has more than one defnition, an error
occurs. The .globl directive only declares the symbol to be global in scope, it does not defne
the symbol.

.group group, section, #comdat
The .group directive adds section to a COMDAT group. Refer to “COMDAT Section” in
Linker and Libraries Guide for additional information about COMDAT.

.hidden symbol1, symbol2, ..., symbolN
The .hidden directive declares each symbol in the list to have hidden linker scoping. All
references to symbol within a dynamic module bind to the definition within that module.
Symbol is not visible outside of the module.

.ident "string"
The .ident directive creates an entry in the .comment section containing string. String is any
sequence of characters, not including the double quote ("). To include the double quote
character within a string, precede the double quote character with a backslash (\) (ASCII
0x5C)

.lcomm name, size, alignment
The .lcomm directive allocates storage in the .bss section. The storage is referenced by the
symbol name, and has a size of size bytes. Name cannot be predefned, and size must be a
positive integer. If alignment is specifed, the address of name is aligned to a multiple of
alignment bytes. If alignment is not specifed, the default alignment is 4 bytes.

.local symbol1, symbol2, ..., symbolN
The .local directive declares each symbol in the list to be local. Each symbol is defned in the
input fle and not accessible to other fles. Default bindings for the symbols are overridden.
Symbols declared with the .local directive take precedence over weak and global symbols.

oralce 汇编02的更多相关文章

  1. X86现代汇编·02

    下面4这个寄存器只能用16位或3N位名称访问3N位寄存器 :ESI EDI EBP ESP 16位寄存器: SI DI BP SP 特殊用法:乘除指令默认用EAX默认使用ECX为循环计数器ESP用于寻 ...

  2. CS萌新的汇编学习之路02 Learning of Assembly Language

    第二节课  寄存器 1. 寄存器的定义: 进行信息储存的器件,是CPU中程序员可以读写的部件,通过改变各种寄存器中的内容来实现对CPU的控制 2. 寄存器的种类: 本节课学习通用寄存器和段寄存器 2. ...

  3. Linux汇编教程02:编写第一个汇编程序

    学习一门语言,最好的方式就是在运用中学习,那么在这一章节中,我们开始编写我们的第一个汇编程序.当然作为第一个程序,其实十分的简单,但可以给大家一个基本的轮廓,了解汇编大概是这样的. 我们这个程序实际上 ...

  4. 鸿蒙内核源码分析(汇编传参篇) | 如何传递复杂的参数 | 百篇博客分析OpenHarmony源码 | v23.02

    百篇博客系列篇.本篇为: v23.xx 鸿蒙内核源码分析(汇编传参篇) | 如何传递复杂的参数 | 51.c.h .o 硬件架构相关篇为: v22.xx 鸿蒙内核源码分析(汇编基础篇) | CPU在哪 ...

  5. 汇编基础知识之二debug的使用

    DEBUG的使用 (要在win32位习题下进行,win7 64位需要安装DosBox和debug这2个软件): 1:win64位下debug的使用教程: 下载debug.exe,这里我把debug放在 ...

  6. c 函数调用产生的汇编指令和数据在内存情况(1)

    一直对函数调用的具体汇编指令和各种变量在内存的具体分配,一知半解.各种资料都很详细,但是不实践,不亲自查看下内存总不能笃定.那就自己做下. 两个目的: 一,函数和函数调用编译后的汇编指令基本样貌 二, ...

  7. Win32汇编环境配置

    放假了,发现自己知识面窄,趁有时间就打算折腾下Win32汇编.其实在学校也上过汇编课,是基于dos的.那时老师不务正业,老跟我们讲政治经济文化,唯独不怎么讲课;再加上自己的问题,导致了dos汇编学得好 ...

  8. 经常使用ARM汇编指令

    一面学习,一面总结,一面记录. 以下是整理在网上找到的一些资料,简单整理记录一下,方便以后查阅. ARM处理器的指令集能够分为跳转指令.数据处理指令.程序状态寄存器(PSR)处理指令.载入/存储指令. ...

  9. C语言的本质(31)——C语言与汇编之函数调用的本质

    我们一段代码来研究函数调用的过程.首先我们写一段简单的小程序: int sum(int c, int d) { inte = c + d; returne; } int func(int a, int ...

随机推荐

  1. Spring Cloud Commons教程(一)普通抽象

    诸如服务发现,负载平衡和断路器之类的模式适用于所有Spring Cloud客户端可以独立于实现(例如通过Eureka或Consul发现)的消耗的共同抽象层. @EnableDiscoveryClien ...

  2. VS 2010内存泄漏检测

    控制台程序在启动时调用 _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); 程序正常退出后会打印内存泄漏信息. MFC程序不用 ...

  3. docker 在centos上的安装实践

    使用yum安装docker yum -y install docker-io [root@localhost goblin]# yum -y install docker-io Loaded plug ...

  4. 三十六、python 中subprocess介绍

    import subprocess 1.执行系统命令subprocess.call('ipconfig') #shell=False时,拼接命令分开写,放在列表中,等于True时,可写一块,空格隔开例 ...

  5. React - 可控组件和非可控组件的选择

    原则 受控组件(用户输入 ---> state 更新 ---> 组件更新)的消耗明显比非受控组件大的多,但非受控组件只能在需求非常简单的情况下的使用. 特性 uncontrolled 受控 ...

  6. 关于 token

    用户在浏览器做一系列操作,后台服务怎么判断这些操作是来自同一个用户? 1. seesion 用户登录后,后台生成 sessionid 返回给浏览器,浏览器的每次请求带上 sessionid,后台关联 ...

  7. 阶段1 语言基础+高级_1-3-Java语言高级_02-继承与多态_第1节 继承_1_继承的概述

    继承,不要按照父亲和儿子的关系去理解,父亲有100快.那么大儿子就有50 小儿子也50 ,他是对半的 这里要按照师傅和徒弟的关系去理解.师傅会九阴真经 那么徒弟也会九阴真经 程序中的继承 讲师和助教有 ...

  8. Java提取文本文档中的所有网址(小案例介绍正则基础知识)

    正则表达式基础以及Java中使用正则查找 定义: 正则表达式是一些用来匹配和处理文本的字符串 正则的基础(先大致了解下) 1. 正则表达式的作用 查找特定的信息(搜索) 替换一些文本(替换) 2. 正 ...

  9. [c#]Extesion method

    做一个类似Vb.net里面with的方法 public static void Use<T>(this T item, Action<T> work) { work(item) ...

  10. Windows + Ubuntu 16.04 双系统安装详细教程(转)

    转载自:http://www.cnblogs.com/Duane/p/6776302.html 前言:本篇文章是对之前文章的更新,更新的主内容是把原来用手机拍摄的图片换成了虚拟机的截图,以及对磁盘划分 ...