1 section .data
2 00000000 00 sum: db 0
3 00000001 [10000000] tbl: dd L
4 section .text
5 global _start
6 _start:
7 00000000 31C0 xor eax, eax
8 00000002 B002 mov al,2
9 00000004 BB[00000000] mov ebx,sum
10 00000009 B200 mov dl,0
11 0000000B B9[01000000] mov ecx,tbl
12 align 16
13 00000010 01C0 L: add eax,eax
14 00000012 FEC2 inc dl
15 00000014 01C0 add eax,eax
16 00000016 0103 add [ebx],eax
17 00000018 FF21 jmp dword [ecx]
18 0000001A 0013 add byte [ebx],dl
19 next:
if the loader will change the position in the memory of the text section to a different one from what the compiler set is line 9 still be correct? (the address of sum
and tbl
will be OK?)