chiark / gitweb /
linking test program
authorian <ian>
Tue, 11 Oct 2005 22:49:19 +0000 (22:49 +0000)
committerian <ian>
Tue, 11 Oct 2005 22:49:19 +0000 (22:49 +0000)
iwjpictest/Makefile
iwjpictest/test.inc [new file with mode: 0644]
iwjpictest/test1.asm [new file with mode: 0644]
iwjpictest/test2.asm [new file with mode: 0644]

index 1edc21a9d0a693df2b3082796223b97808e0e55a..959afef3922fca977683050bc4502265a2c66125 100644 (file)
@@ -24,4 +24,8 @@ insn-check.txt:       insn-makecheck insn-aliases.inc
 insn-%.ps:     insn-%.txt Makefile
                atp -T A4 -B -f Courier7.4 <$< $o
 
+test1.o test2.o:       test.inc
+test.hex:              test1.o test2.o
+                       $(LINK)
+
 copybits.o serialloop.o:       onecopybit.inc
diff --git a/iwjpictest/test.inc b/iwjpictest/test.inc
new file mode 100644 (file)
index 0000000..790af16
--- /dev/null
@@ -0,0 +1,6 @@
+; test for externs and res and stuff
+
+ include /usr/share/gputils/header/p18f458.inc
+
+;      extern          somewhere
+;      extern          nothing_much
diff --git a/iwjpictest/test1.asm b/iwjpictest/test1.asm
new file mode 100644 (file)
index 0000000..997974d
--- /dev/null
@@ -0,0 +1,24 @@
+; test for globals and res and stuff
+
+ extern nothing_much
+ global fixed
+ global somewhere
+
+               include         test.inc
+
+               udata_acs
+somewhere      res 1   ; silly variable which gets incremented
+
+               udata 0x200
+fixed          res 16
+
+vectors                code            0
+               goto            startup
+
+               code
+
+startup
+               call            nothing_much
+               goto            startup
+
+               end
diff --git a/iwjpictest/test2.asm b/iwjpictest/test2.asm
new file mode 100644 (file)
index 0000000..46b799b
--- /dev/null
@@ -0,0 +1,17 @@
+; test for globals and res and stuff
+
+               include         test.inc
+
+               code
+
+nothing_much
+               incf            somewhere, 1
+               lfsr            0, fixed
+               decf            POSTINC0
+               return
+
+ global nothing_much
+ extern somewhere
+ extern fixed
+
+               end