From f306071516c6f1b06aff7684a292bcc79eadad08 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 13 Jan 2015 22:06:19 -0800 Subject: 557 --- chessboard-cursor.arc.t | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) 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 @@ -36,6 +36,32 @@ (prn "F - chessboard accepts legal moves (-)")) ;? (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") -- cgit 1.4.1-2-gfad0