summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2021-04-09 17:54:44 +0800
committerIru Cai <mytbk920423@gmail.com>2021-04-09 17:54:44 +0800
commit472639f81ddb63678faa3399737aca930a1bf2f9 (patch)
tree7ea2f88bec64fdf39c308a60827308242ddfd055
parent536b915353cd6652ef84a7c6746826027b03c418 (diff)
downloadwin32-examples-472639f81ddb63678faa3399737aca930a1bf2f9.tar.xz
dummy_alt_start.asmHEADmaster
-rw-r--r--dummy/dummy_alt_start.asm16
1 files changed, 16 insertions, 0 deletions
diff --git a/dummy/dummy_alt_start.asm b/dummy/dummy_alt_start.asm
new file mode 100644
index 0000000..7196dfb
--- /dev/null
+++ b/dummy/dummy_alt_start.asm
@@ -0,0 +1,16 @@
+; dummy: dummy_simple.asm, but using another start address
+; NOTE: we need to specify "-e _start" in the ld command line, and make _start in .text section
+; nasm -f win32 -o dummy.obj dummy_alt_start.asm
+; i686-w64-mingw32-ld -e _start -o dummy.exe dummy.obj -lkernel32
+
+global _start
+
+extern __imp__ExitProcess@4
+
+section .text
+
+header:
+ int3
+_start:
+ push 2
+ call [__imp__ExitProcess@4]