I got this morning an idea how can I pass the label.
Nasm supports overloading of parameters.
Unfortunately, it takes but a lot of code.
Can not simplify it somehow?
[Bits 32]
; Beendet das Skript.
%macro Exit 0-1 0
extern ExitProcess
import ExitProcess Kernel32.dll
push %1
call [ExitProcess]
%endmacro
; Zeigt eine einfache MessageBox an.
%macro MsgBox 3-5 0,0
extern MessageBoxA
import MessageBoxA User32.dll
push %1
push %%Titel
push %%Text
push %5
call [MessageBoxA]
[section .data]
%%Titel:
db %2,0
%%Text:
db %3,0
[section .text]
%endmacro
; Deklariert eine Variable.
%macro Dim 2
[section .data]
%1:
dd %2
[section .text]
%macro %1 2 %1
%1 %2
mov dword [%3], eax
%endmacro
%macro %1 3 %1
%1 %2, %3
mov dword [%4], eax
%endmacro
%macro %1 4 %1
%1 %2, %3, %4
mov dword [%5], eax
%endmacro
%macro %1 5 %1
%1 %2, %3, %4, %5
mov dword [%6], eax
%endmacro
%macro %1 6 %1
%1 %2, %3, %4, %5, %6
mov dword [%7], eax
%endmacro
%macro %1 7 %1
%1 %2, %3, %4, %5, %6, %7
mov dword [%8], eax
%endmacro
; ...
%endmacro
segment .text use32
..start:
; Autoit Syntax Start
Dim $Test, 2
$Test MsgBox, 3, "Frage:", "Ja oder Nein?"
Exit