diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2014-07-31 02:04:01 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2014-07-31 02:04:01 -0700 |
commit | 66a52b5ff217de8035cb7829d33c630f1bb1462b (patch) | |
tree | a7d6535769a2d84689f2f284cd6321301e459244 | |
parent | 73978d2f828570f8bc6ff0c80deeed277eddac0d (diff) | |
download | mu-66a52b5ff217de8035cb7829d33c630f1bb1462b.tar.gz |
11 - fix 'deref'
It was broken since commit 7.
-rw-r--r-- | mu.arc | 2 | ||||
-rw-r--r-- | 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 |