From: ian Date: Tue, 11 Oct 2005 22:49:19 +0000 (+0000) Subject: linking test program X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=1f60110f42910af0d8e20b88659c6fc354f603fb;p=trains.git linking test program --- diff --git a/iwjpictest/Makefile b/iwjpictest/Makefile index 1edc21a..959afef 100644 --- a/iwjpictest/Makefile +++ b/iwjpictest/Makefile @@ -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 index 0000000..790af16 --- /dev/null +++ b/iwjpictest/test.inc @@ -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 index 0000000..997974d --- /dev/null +++ b/iwjpictest/test1.asm @@ -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 index 0000000..46b799b --- /dev/null +++ b/iwjpictest/test2.asm @@ -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