X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fvarargs.asm;fp=tests%2Fvarargs.asm;h=6026659533ca2d97aeb3c8a09f76d95933419fc8;hb=acd03176c7934f7b876cfadbeb9e1060d6535b94;hp=0000000000000000000000000000000000000000;hpb=19b07b62484f19ec2d59e7489e96f4ec877d3fbd;p=ia32rtools.git diff --git a/tests/varargs.asm b/tests/varargs.asm new file mode 100644 index 0000000..6026659 --- /dev/null +++ b/tests/varargs.asm @@ -0,0 +1,27 @@ + +_text segment para public 'CODE' use32 + +sub_test proc near + +var_200 = byte ptr -200h +arg_0 = dword ptr 8 +arg_4 = byte ptr 0Ch + + push ebp + mov ebp, esp + sub esp, 200h + lea eax, [ebp+arg_4] + push eax ; va_list + lea eax, [ebp+var_200] + push [ebp+arg_0] ; char * + push 200h ; size_t + push eax ; char * + call __vsnprintf + add esp, 10h + leave + retn +sub_test endp + +_text ends + +; vim:expandtab