Gast
#3359152
Hey there, I am currently writing a call macro in NASM (elf64), which can be used like: dcall FUNCTION, param1, param2, param3, ... The parameters are handled differently, depending on their type. Numbers become immediates, strings need to be placed in the .data section, and are then referenced by its address (label).
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
16 | |
17 | |
18 | |
19 | |
20 | |
21 | |
22 | |
23 | |
24 | |
25 | |
26 | |
27 | |
28 | |
29 | |
30 | |
31 | |
32 | |
33 | |
34 | |
35 | |
36 | |
37 | |
38 | |
39 | |
40 | |
41 | |
42 | |
43 | |
44 | |
45 | |
46 | |
47 | |
48 | |
49 | |
50 | |
51 | |
52 | |
This works fine, unless there is more than one string parameter. In that case, the local %%str label is not unique any more. Does anyone know how to deal with this? Is there a way using macro contexts?