From 0b269f32dd9b8d349f94793dad44e728473e9f0a Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Thu, 31 Oct 2013 15:35:11 +0100 Subject: First commit ; includes first TP and minijazz compiler --- tp1/test/ram.mj | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tp1/test/ram.mj (limited to 'tp1/test/ram.mj') diff --git a/tp1/test/ram.mj b/tp1/test/ram.mj new file mode 100644 index 0000000..7c4d1ed --- /dev/null +++ b/tp1/test/ram.mj @@ -0,0 +1,15 @@ +const addr = 2 +const word = 4 + +or_n(a:[n],b:[n]) = (o:[n]) where + if n = 0 then + o = [] + else + o = (a[0] and b[0]).(or_n(a[1..], b[1..])) + end if +end where + +main(ra:[addr], we, wa:[addr], c:[word]) = (o:[word]) where + o = ram(ra, we, wa, or_n(o, c)) +end where + -- cgit v1.2.3