diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-01-13 22:06:19 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-01-13 22:06:19 -0800 |
commit | f306071516c6f1b06aff7684a292bcc79eadad08 (patch) | |
tree | ca576485bb47630f85244ed742bae7149b0d8429 | |
parent | c1f8217a7c02316823d12f6638573ad7b987ee4f (diff) | |
download | mu-f306071516c6f1b06aff7684a292bcc79eadad08.tar.gz |
557
-rw-r--r-- | chessboard-cursor.arc.t | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/chessboard-cursor.arc.t b/chessboard-cursor.arc.t index 473308f3..a3edfab0 100644 --- a/chessboard-cursor.arc.t +++ b/chessboard-cursor.arc.t @@ -37,6 +37,32 @@ ;? (quit) (reset) +(new-trace "read-move-incomplete") +(add-code:readfile "chessboard-cursor.mu") +(add-code + '((function! main [ + (default-space:space-address <- new space:literal 30:literal/capacity) + (1:channel-address/raw <- init-channel 3:literal) + (r:integer/routine <- fork-helper read-move:fn nil:literal/globals 200:literal/limit) + (c:character <- copy ((#\a literal))) + (x:tagged-value <- save-type c:character) + (1:channel-address/raw/deref <- write 1:channel-address/raw x:tagged-value) + (c:character <- copy ((#\2 literal))) + (x:tagged-value <- save-type c:character) + (1:channel-address/raw/deref <- write 1:channel-address/raw x:tagged-value) + (c:character <- copy ((#\- literal))) + (x:tagged-value <- save-type c:character) + (1:channel-address/raw/deref <- write 1:channel-address/raw x:tagged-value) + (c:character <- copy ((#\a literal))) + (x:tagged-value <- save-type c:character) + (1:channel-address/raw/deref <- write 1:channel-address/raw x:tagged-value) + (sleep until-routine-done:literal r:integer/routine) + ]))) +(run 'main) +(if (ran-to-completion 'read-move) + (prn "F - chessboard hangs until 5 characters are entered")) + +(reset) (new-trace "read-move-quit") (add-code:readfile "chessboard-cursor.mu") (add-code |