From 66a52b5ff217de8035cb7829d33c630f1bb1462b Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 31 Jul 2014 02:04:01 -0700 Subject: 11 - fix 'deref' It was broken since commit 7. --- mu.arc | 2 +- new.mu | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mu.arc b/mu.arc index 842f12f9..c44e1269 100644 --- a/mu.arc +++ b/mu.arc @@ -112,7 +112,7 @@ (= (m oarg.0) (m arg.0)) deref (= (m oarg.0) - (m (memory* arg.0))) ; TODO + (memory* (m arg.0))) reply (do (= result arg) (break)) diff --git a/new.mu b/new.mu index 0f86f378..0ec7a440 100644 --- a/new.mu +++ b/new.mu @@ -1,14 +1,14 @@ ; memory map: 1-1000 reserved for the (currently non-reentrant) allocator (main - ((integer 1) <- literal 1000) ; location 1 contains the high-water mark for the memory allocator - ((integer-pointer 4) <- new) - ((integer 5) <- deref (integer-pointer 4)) + ((1 integer) <- literal 1000) ; location 1 contains the high-water mark for the memory allocator + ((4 integer-pointer) <- new) + ((5 integer) <- deref (4 integer-pointer)) ) (new - ((integer-pointer 2) <- copy (integer 1)) - ((integer 3) <- literal 1) - ((integer 1) <- add (integer 1) (integer 3)) - (reply (integer-pointer 2))) + ((2 integer-pointer) <- copy (1 integer)) + ((3 integer) <- literal 1) + ((1 integer) <- add (1 integer) (3 integer)) + (reply (2 integer-pointer))) ;; vim:ft=scheme -- cgit 1.4.1-2-gfad0