summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
Diffstat (limited to 'samples')
-rw-r--r--samples/Makefile.am8
-rw-r--r--samples/Makefile.samples11
-rw-r--r--samples/fichier1.s6
-rw-r--r--samples/fichier2.s3
-rw-r--r--samples/testtout.s11
5 files changed, 30 insertions, 9 deletions
diff --git a/samples/Makefile.am b/samples/Makefile.am
index 2427d6a..92a419b 100644
--- a/samples/Makefile.am
+++ b/samples/Makefile.am
@@ -1,3 +1,7 @@
-EXTRA_DIST = rechcara.s recherche.s sommeentiers.s testtout.s Makefile.samples instructions.txt
+EXTRA_DIST = fichier1.s fichier2.s rechcara.s recherche.s sommeentiers.s testtout.s Makefile.samples instructions.txt boucle.s
-TESTS = make -f Makefile.samples
+all:
+ make -f Makefile.samples
+
+clean:
+ male -f Makefile.samples clean
diff --git a/samples/Makefile.samples b/samples/Makefile.samples
index 7d004ca..978d9d0 100644
--- a/samples/Makefile.samples
+++ b/samples/Makefile.samples
@@ -10,7 +10,14 @@
chmod 755 $@
rm tmp.o
-all: hello recherche rechcara sommeentiers testtout
+all: helloworld hello recherche rechcara sommeentiers testtout boucle
+
+helloworld: fichier1.s fichier2.s
+ ../src/compilo fichier1.s fichier1.o
+ ../src/compilo fichier2.s fichier2.o
+ ../src/linker fichier1.o fichier2.o helloworld
+ chmod 755 helloworld
+ rm fichier1.o fichier2.o
clean:
- rm -f recherche rechcara sommeenters testtout *.o __symbols__ __text__
+ rm -f helloworld recherche rechcara sommeenters testtout *.o __symbols__ __text__
diff --git a/samples/fichier1.s b/samples/fichier1.s
new file mode 100644
index 0000000..adefefb
--- /dev/null
+++ b/samples/fichier1.s
@@ -0,0 +1,6 @@
+.data
+Hello DS "Hello World\n"
+
+.text
+Print: MOV, [0xffffff04], Hello
+ HALT
diff --git a/samples/fichier2.s b/samples/fichier2.s
new file mode 100644
index 0000000..fc3187e
--- /dev/null
+++ b/samples/fichier2.s
@@ -0,0 +1,3 @@
+.text
+.start
+ JMP Print
diff --git a/samples/testtout.s b/samples/testtout.s
index f8bbdbf..2287a4d 100644
--- a/samples/testtout.s
+++ b/samples/testtout.s
@@ -1,8 +1,9 @@
.data
-PROG1 DS "hello"
-PROG2 DS "sommeentiers"
-PROG3 DS "rechcara"
-PROG4 DS "recherche"
+PROG1 DS "helloworld"
+PROG2 DS "hello"
+PROG3 DS "sommeentiers"
+PROG4 DS "rechcara"
+PROG5 DS "recherche"
MSG1 DS "Exécution du programme numéro "
MSG2 DS " appelé "
@@ -10,7 +11,7 @@ MSG3 DS "...\n"
MSGTERM DS "Le programme s'est terminé!\n"
MSGFIN DS "Tout est terminé, bye!\n"
-PROGS DD PROG1, PROG2, PROG3, PROG4, 0
+PROGS DD PROG1, PROG2, PROG3, PROG4, PROG5, 0
.text
.start