In the next code:
section .data
sa db ’abxdefghxl’,0
la EQU $ - sa
sb db ’abcdexghil’,0
section .text
As I saw in my program, when I do mov ecx, la – then I got the number 11 in ECX.
I didn’t understand why – the number of abxdefghxl is not 10. We also count the 0?
Assume
sato start at0x400. You have defined 10 (abxdefghxl) plus 1 (0at the end ) And hencelawwould start at0x40B. $ represents the current instruction/directive address. Hence$-sa=0xBor11