about summary refs log tree commit diff stats
path: root/subx/apps
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-07-11 21:52:56 -0700
committerKartik Agaram <vc@akkartik.com>2019-07-11 21:52:56 -0700
commit2c45de094b4851c3cabed4ab6a1c916d41a22e8a (patch)
tree7a3f3bbe5f01e95b87a3cd67fcfa66e0ead60ed5 /subx/apps
parent98994d5bccb87935870fc0a96da8f1a63aaf9dfe (diff)
downloadmu-2c45de094b4851c3cabed4ab6a1c916d41a22e8a.tar.gz
.
Pseudocode is a little more truthful now about what variables are on the
stack.
Diffstat (limited to 'subx/apps')
-rw-r--r--subx/apps/survey.subx12
1 files changed, 5 insertions, 7 deletions
diff --git a/subx/apps/survey.subx b/subx/apps/survey.subx
index a5e82759..5ae984d1 100644
--- a/subx/apps/survey.subx
+++ b/subx/apps/survey.subx
@@ -320,19 +320,19 @@ test-convert-computes-addresses:
 # global scratch space for compute-offsets in the data segment
 == data
 
-compute-offsets:curr-segment-name:
+compute-offsets:curr-segment-name:  # slice
   0/imm32/start
 compute-offsets:curr-segment-name:end:
   0/imm32/end
-compute-offsets:file-offset:
+compute-offsets:file-offset:  # int
   0/imm32
-compute-offsets:segment-offset:
+compute-offsets:segment-offset:  # int
   0/imm32
 compute-offsets:word-slice:
   0/imm32/start
 compute-offsets:word-slice:end:
   0/imm32/end
-compute-offsets:segment-start:
+compute-offsets:segment-start:  # slice
   0/imm32/start
   0/imm32/end
 
@@ -340,15 +340,13 @@ compute-offsets:segment-start:
 
 compute-offsets:  # in : (address buffered-file), segments : (address stream {string, segment-info}), labels : (address stream {string, label-info})
     # pseudocode:
-    #   var curr-segment-name : (address slice) = {0, 0}
-    #   var file-offset = 0, segment-offset = 0
     #   var line = new-stream(512, 1)
     #   while true                                  # line loop
     #     clear-stream(line)
     #     read-line-buffered(in, line)
     #     if (line->write == 0) break               # end of file
     #     while true                                # word loop
-    #       var word-slice = next-word(line)
+    #       word-slice = next-word(line)
     #       if slice-empty?(word-slice)             # end of line
     #         break
     #       if slice-starts-with?(word-slice, "#")  # comment
*/ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
void parse_null_returns_null(void **state);
void parse_empty_returns_null(void **state);
void parse_space_returns_null(void **state);
void parse_cmd_no_args_returns_null(void **state);
void parse_cmd_with_space_returns_null(void **state);
void parse_cmd_with_too_few_returns_null(void **state);
void parse_cmd_with_too_many_returns_null(void **state);
void parse_cmd_one_arg(void **state);
void parse_cmd_two_args(void **state);
void parse_cmd_three_args(void **state);
void parse_cmd_three_args_with_spaces(void **state);
void parse_cmd_with_freetext(void **state);
void parse_cmd_one_arg_with_freetext(void **state);
void parse_cmd_two_args_with_freetext(void **state);
void parse_cmd_min_zero(void **state);
void parse_cmd_min_zero_with_freetext(void **state);
void parse_cmd_with_quoted(void **state);
void parse_cmd_with_quoted_and_space(void **state);
void parse_cmd_with_quoted_and_many_spaces(void **state);
void parse_cmd_with_many_quoted_and_many_spaces(void **state);
void parse_cmd_freetext_with_quoted(void **state);
void parse_cmd_freetext_with_quoted_and_space(void **state);
void parse_cmd_freetext_with_quoted_and_many_spaces(void **state);
void parse_cmd_freetext_with_many_quoted_and_many_spaces(void **state);
void parse_cmd_with_quoted_freetext(void **state);
void parse_cmd_with_third_arg_quoted_0_min_3_max(void **state);
void parse_cmd_with_second_arg_quoted_0_min_3_max(void **state);
void parse_cmd_with_second_and_third_arg_quoted_0_min_3_max(void **state);
void count_one_token(void **state);
void count_one_token_quoted_no_whitespace(void **state);
void count_one_token_quoted_with_whitespace(void **state);
void count_two_tokens(void **state);
void count_two_tokens_first_quoted(void **state);
void count_two_tokens_second_quoted(void **state);
void count_two_tokens_both_quoted(void **state);
void get_first_of_one(void **state);
void get_first_of_two(void **state);
void get_first_two_of_three(void **state);
void get_first_two_of_three_first_quoted(void **state);
void get_first_two_of_three_second_quoted(void **state);
void get_first_two_of_three_first_and_second_quoted(void **state);
void parse_options_when_none_returns_empty_hasmap(void **state);
void parse_options_when_opt1_no_val_sets_error(void **state);
void parse_options_when_one_returns_map(void **state);
void parse_options_when_opt2_no_val_sets_error(void **state);
void parse_options_when_two_returns_map(void **state);
void parse_options_when_opt3_no_val_sets_error(void **state);
void parse_options_when_three_returns_map(void **state);
void parse_options_when_unknown_opt_sets_error(void **state);
void parse_options_with_duplicated_option_sets_error(void **state);