summaryrefslogtreecommitdiff
path: root/rdoff/test/testlib.asm
diff options
context:
space:
mode:
Diffstat (limited to 'rdoff/test/testlib.asm')
-rw-r--r--rdoff/test/testlib.asm18
1 files changed, 18 insertions, 0 deletions
diff --git a/rdoff/test/testlib.asm b/rdoff/test/testlib.asm
new file mode 100644
index 00000000..6ee3d89a
--- /dev/null
+++ b/rdoff/test/testlib.asm
@@ -0,0 +1,18 @@
+; program to test retrieval of and linkage to modules in libraries by
+; ldrdf
+
+[SECTION .text]
+[GLOBAL _main]
+[EXTERN _strcmp]
+
+_main:
+ push dword string1
+ push dword string2
+ call _strcmp
+ add esp,8 ; doh! clear up stack ;-)
+ ret
+
+[SECTION .data]
+
+string1: db 'abc',0 ; try changing these strings and see
+string2: db 'abd',0 ; what happens!