汇编语言中的@和$是什么意思啊?
这么一段话:
dll注意下 要进行重定位
call $+5 ;机器码是 E8 00000000 00000000是相对地址
@@: pop ebx
sub ebx, @b
里边的@@是什么意思?后边的@b呢?为什么上边的call 不需要重定位,而变量需要重定位?
追问:这里的@@和@b是必须写成这样吗?比如我把@@改为@a,@b改为@c或者XYZ@后面必须是寄存器是什么意思?@b和@c都是表示的寄存器?表示的哪个寄存器?但是电脑里没有b和c寄存器吧?只有eax,ebx之类的啊。难道实际使用中要把这个替换成@eax?完全不懂T_T。但是我觉得@b应该改成offset @@,这样才是把重定位信息保存到ebx啊。那你能不能解释一下@@和@b各表示什么意思啊?@@只是一个普通的LABEL么?
答案:算了,我来回答,本来很简单的问题,搞出这么多的花样。以下是直接从masm 6.1文档摘录出来的:
Use two at signs (@@) followed by a colon (:) as an anonymous label. To jump to the nearest preceding anonymous label, use @B (back) in the jump instruction’s operand field; to jump to the nearest following anonymous label, use @F (forward) in the operand field.
The jump in the following example targets an anonymous label:
jge @F
.
.
.
@@:
The items @B and @F always refer to the nearest occurrences of @@:, so there is never any conflict between different anonymous labels.
---------------------------
其他:@@是标号,pop ebx这条指令的标号
比如需要跳转到这条指令时,可以用LJMP @@或SJMP @@
@b是指间接地址 楼主给出的汇编语言,是80x86系列CPU的32位的汇编语言。
楼上,回答者 yyh001123 解释的汇编:LJMP、SJMP,是单片机8031的汇编语言。
俩人说的不是一档子事。
上一个:我的电脑是win7 64bit ,刚刚开始学习汇编,想自己实践实践,可是找不到debug程序
下一个:在汇编语言中怎样dos命令中使用debug