曲径通幽论坛

 找回密码
 立即注册
搜索
查看: 6577|回复: 1

AT&T 和 NASM 的一些区别

[复制链接]

4917

主题

5879

帖子

3万

积分

GROAD

曲径通幽,安觅芳踪。

Rank: 6Rank: 6

积分
34382
发表于 2011-1-8 10:13:15 | 显示全部楼层 |阅读模式
GAS memory operand            NASM memory operand
------------------                          -------------------

100                                            [100]
%es:100                                    [es:100]
(%eax)                                       [eax]
(%eax,%ebx)                              [eax+ebx]
(%ecx,%ebx,2)                           [ecx+ebx*2]
(,%ebx,2)                                   [ebx*2]
-10(%eax)                                  [eax-10]
%ds:-10(%ebp)                          [ds:ebp-10]

GAS syntax            NASM syntax
==========            ===========

jmp    *100              jmp  near [100]
call    *100              call near [100]
jmp    *%eax            jmp  near eax
jmp    *%ecx            call near ecx
jmp    *(%eax)         jmp  near [eax]
call    *(%ebx)         call near [ebx]
ljmp    *100             jmp  far  [100]
lcall    *100             call far  [100]
ljmp    *(%eax)        jmp  far  [eax]
lcall    *(%ebx)        call far  [ebx]
ret                          retn
lret                         retf
lret $0x100            retf 0x100
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|曲径通幽 ( 琼ICP备11001422号-1|公安备案:46900502000207 )

GMT+8, 2024-3-29 07:24 , Processed in 0.074901 second(s), 22 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表