summaryrefslogtreecommitdiff
path: root/rdoff/test/rdfseg.asm
diff options
context:
space:
mode:
Diffstat (limited to 'rdoff/test/rdfseg.asm')
-rw-r--r--rdoff/test/rdfseg.asm20
1 files changed, 20 insertions, 0 deletions
diff --git a/rdoff/test/rdfseg.asm b/rdoff/test/rdfseg.asm
new file mode 100644
index 0000000..4c6f587
--- /dev/null
+++ b/rdoff/test/rdfseg.asm
@@ -0,0 +1,20 @@
+ ;; program to test inter-segment production and linkage of RDF objects
+
+ ;; [1] should produce segment base ref
+ ;; [2] should produce standard relocation
+
+[GLOBAL _main]
+[EXTERN _puts: far]
+[BITS 16]
+
+_main:
+ mov ax, seg _message ; 0000 [1]
+ mov ds, ax ; 0003
+ mov dx, _message ; 0005 [2]
+ call far _puts ; 0008 [2][1]
+ xor ax,ax ; 000D
+ int 21h ; 000F
+
+[SECTION .data]
+_message: db 'Hello, World', 10, 13, 0
+ \ No newline at end of file