X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fderef.asm;fp=tests%2Fderef.asm;h=8108a71ba254885c286847b35244824faee24339;hb=93b5bd181600ddf5097d133c52cdc7b1d4a2c7c8;hp=0000000000000000000000000000000000000000;hpb=7f20f63315d3097ddd97a57567facd981be9bd61;p=ia32rtools.git diff --git a/tests/deref.asm b/tests/deref.asm new file mode 100644 index 0000000..8108a71 --- /dev/null +++ b/tests/deref.asm @@ -0,0 +1,25 @@ + +_text segment para public 'CODE' use32 + +sub_test proc near + push ebp + mov ebp, esp + push esi + mov esi, ptr_struct1 + push 1 + call dword ptr [esi] + mov eax, [esi+4] + push 2 + call dword ptr [eax+4] + pop esi + pop ebp + retn +sub_test endp + +_text ends + +_rdata segment para public 'DATA' use32 +ptr_struct1 dd 0 +_rdata ends + +; vim:expandtab