Warn if trying to assemble obsolete instructions
[nasm.git] / test / pcrel.asm
blob53e0aa41ba51b532e0acf0a0a87e493068af93bb
1 bits 32
2 foo: ; Backwards reference
3 mov eax,[foo - $]
4 mov ebx,[ebx + foo - $]
5 mov ecx,foo - $
6 mov edx,foo - bar
8 mov eax,[bar - $]
9 mov ebx,[ebx + bar - $]
10 mov ecx,bar - $
11 mov edx,bar - foo
13 mov eax,[baz - $]
14 mov ebx,[ebx + baz - $]
15 mov esi,[baz - bar]
16 mov ecx,baz - $
17 mov edx,baz - bar
19 bits 64
20 default rel
22 times 16 nop
24 mov eax,[foo]
25 mov eax,[foo - $]
26 mov eax,[abs foo - $]
27 mov ebx,[rbx + foo - $]
28 mov ecx,foo - $
29 mov edx,foo - bar
31 mov eax,[bar]
32 mov eax,[bar - $]
33 mov eax,[abs bar - $]
34 mov ebx,[rbx + bar - $]
35 mov ecx,bar - $
36 mov edx,bar - foo
38 mov eax,[baz]
39 mov eax,[baz - $]
40 mov eax,[abs baz - $]
41 mov ebx,[rbx + baz - $]
42 mov esi,[baz - bar]
43 mov esi,[abs baz - bar]
44 mov ecx,baz - $
45 mov edx,baz - bar
47 bar: ; Forwards reference
48 hlt
50 section ".data"
51 baz: ; Other-segment reference
52 dd 0