diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-01-15 00:00:46 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-01-15 00:00:46 -0800 |
commit | 0d2c3387c59b039ce2dc58ad4545feb04ddc4de4 (patch) | |
tree | 8f87ddd5b5590656e95ea99b27e5132672e4d525 /fork.mu | |
parent | ec6364a0343315c14dfd1b926991b5ccdd1d7542 (diff) | |
download | mu-0d2c3387c59b039ce2dc58ad4545feb04ddc4de4.tar.gz |
571 - screen primitives take an explicit terminal
This will let me swap in a fake in tests. Still hacky, though. I'm sure I'm not managing the parameter right in the chessboard app. And then there's the question of whether it should also appear as an output operand. But it's a start. And using nil to mean 'real' is a reasonable convention. If I ever need to handle multiple screens perhaps we'll have to switch to 1:literal/terminal and 2:literal/terminal, etc. But those are equally easy to guard on.
Diffstat (limited to 'fork.mu')
-rw-r--r-- | fork.mu | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fork.mu b/fork.mu index ba19e3af..edd8eb8d 100644 --- a/fork.mu +++ b/fork.mu @@ -3,7 +3,7 @@ (default-space:space-address <- new space:literal 2:literal) (x:integer <- copy 34:literal) { begin - (print-primitive x:integer) + (print-primitive nil:literal/terminal x:integer) (loop) } ]) @@ -12,7 +12,7 @@ (default-space:space-address <- new space:literal 2:literal) (y:integer <- copy 35:literal) { begin - (print-primitive y:integer) + (print-primitive nil:literal/terminal y:integer) (loop) } ]) |