about summary refs log tree commit diff stats
path: root/example/samples
diff options
context:
space:
mode:
authorCamille Mougey <commial@gmail.com>2015-02-10 11:15:19 +0100
committerCamille Mougey <commial@gmail.com>2015-02-10 11:15:19 +0100
commit4070252c4889800dad164d1962edea741e5b3b3b (patch)
treecf2eb6315c6b00d32fb0fa6bb1d4e663e9012a7f /example/samples
parenta222d2a117898eaa91dd85758d4ef47a7af6ef52 (diff)
parent280ab8eb52525c664dba9286949869fadb61f3ed (diff)
downloadmiasm-4070252c4889800dad164d1962edea741e5b3b3b.tar.gz
miasm-4070252c4889800dad164d1962edea741e5b3b3b.zip
Merge pull request #54 from serpilliere/fix_x86_pop_esp
Fix x86 pop esp
Diffstat (limited to 'example/samples')
-rw-r--r--example/samples/x86_32_pop_esp.S18
1 files changed, 18 insertions, 0 deletions
diff --git a/example/samples/x86_32_pop_esp.S b/example/samples/x86_32_pop_esp.S
new file mode 100644
index 00000000..4115a522
--- /dev/null
+++ b/example/samples/x86_32_pop_esp.S
@@ -0,0 +1,18 @@
+main:
+    MOV EAX, ESP
+    CALL test
+    MOV ESP, EAX
+    PUSH 0
+    PUSH title
+    PUSH msg
+    PUSH 0
+    CALL DWORD PTR [ MessageBoxA ]
+    RET
+
+test:
+    POP ESP
+    JMP ESP
+title:
+.string "Hello!"
+msg:
+.string "World!"