AT&T mnemonic conventions

来源:互联网 发布:山西省大数据产业协会 编辑:程序博客网 时间:2024/06/06 00:23

(1) AT&T mnemonics and register names are invariably(总是,一定地,不变地) lowercase, Intel(nasm) suggest uppercase but will accept lowercase, AT&T requires lowercase;

AT&T助记符和寄存器名字一定是小写字母,而Intel(nasm)建议是大写字母,但是也接受小写字母,但是AT&T要求必须是小写字母;


(2) Register names are always preceded by the percent symbol %;

Intel: AX or EBX

AT&T: %ax or %ebx


寄存器名字之前总是有百分号%;


(3) Every AT&T machine instruction mnemonic that has operands has a single-character suffix(后缀) indicating how large its operands are;

b ---> byte, 8bits

w--->word, 16bits

l--->long, 32bits


每一个AT&T机器指令助记符,如果有操作数的话,都有一个单字母的后缀,表明它操作数的位数;


Intel: MOV BX, AX

AT&T: movw %ax, %bx


(4) In the AT&T syntax, source and destination operands are placed in the opposite order from Intel syntax:

Intel: MOV BX, AX

AT&T: movw %ax, %bx


在AT&T语法中,源操作数和目的操作数的顺序与Intel语法中是刚好相反的;


(5) In the AT&T syntax, immediate operands are always preceded by the dollar sign($):

Intel: PUSH 32

AT&T: pushl $32


在AT&T语法中,立即数的前面总是有美元符号$;


(6) Not all AT&T instruction mnemonics are generated by gcc:

Equivalents to Intel's JCXZ, JECXZ, LOOP, LOOPZ, LOOPE, LOOPNZ, and LOOPNE have only recently been added to the AT&T mnemonic set, and gcc never generates code that uses them


不是所有的AT&T指令助记符都由gcc产生,有些指令gcc不产生;


(7) In the AT&T syntax, displacements in memory reference are signed quantities placed outstide parentheses contaning the base, index, and scale values;


相关日志:AT&T Memory Reference Syntax

 

0 0
原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 孩子去当兵联系不上怎么办 军训戴眼镜晒痕怎么办 想进部队体检没过怎么办 大腿跟小腿不直怎么办 腿被车门夹了怎么办 脚出汗穿凉鞋滑怎么办 玩游戏手出汗屏幕滑怎么办 新买的鞋子臭怎么办 当公民利益受到侵犯怎么办 唇钉里面长肉怎么办 宝宝舔了一口酒怎么办 头被玻璃门撞了怎么办 30多了还一事无成 未来怎么办 27岁失业了该怎么办 无业证明不给开怎么办 典型的缺乏运动的肥胖怎么办 30岁了不想结婚怎么办 专家解释欠30万怎么办 欠医院十几万钱怎么办 当你迷茫的时候怎么办 被骗了一年的积蓄怎么办 当兵身高视力都不够怎么办 当兵中途不想当了怎么办 当兵后不想当了怎么办 在泰国想剪头发怎么办 省二证书丢了怎么办 职称计算机级别报错怎么办 科一不会用电脑怎么办 西安科目三挂了怎么办 我有c照想考a照怎么办 叉车证单位不给怎么办 刚练科目三害怕怎么办 摩托科目一考不过怎么办 人老了视力不好怎么办 2岁宝宝视力不好怎么办 唱歌音总是唱不准怎么办 考级没地方练琴怎么办 少儿声乐唱不准音该怎么办 学历认证报告编号忘记了怎么办 自考挂科10门了怎么办 高中的会考没过怎么办