Asm表达与时俱进的误解 [英] Asm expression misunderstanding with times
问题描述
你好,
有人可以解释一下这些行吗?
Hello,
Somebody can explain me these lines ?
buffer: db 'hello, world'
times 64-$+buffer db '_'
结果:你好,世界_____________________________________________
我理解下面的这些行,这是有意义的( addresse我们站在减去程序开头的地址=程序的大小(以字节为单位):
result : "hello, world____________________________________________________"
I understand these lines below, it makes sense (addresse where we stand minus addresse of the beginning of the program = size of the program in bytes) :
times 510 - ($-$$) db 0
但是在第一个表达式中$ + buffer如何才能使52?我只是不明白为什么一个+不是 - ?
感谢您提前帮助:)
我尝试了什么:
i试图在谷歌或其他什么方面做一些解释,但没有任何成功
But in the first expression how $+buffer can make 52 ?? i just don't get it why a + not a - ?
Thanks for help by advance :)
What I have tried:
i have tried to fine some explanation on google or whatever but without any success
推荐答案
+ buffer db ' _'
+buffer db '_'
结果:你好,世界_____________________________________________
我理解下面的这些行,它使感觉(我们站在减去程序开头的地址=程序大小的字节数):
result : "hello, world____________________________________________________"
I understand these lines below, it makes sense (addresse where we stand minus addresse of the beginning of the program = size of the program in bytes) :
times 510 - (
-
)db 0
但在第一个表达式中如何
But in the first expression how
这篇关于Asm表达与时俱进的误解的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!