1 fn evaluate functions: (addr handle function), bindings: (addr table), scratch: (addr line), end: (addr word), out: (addr value-stack) { 2 var line/eax: (addr line) <- copy scratch 3 var word-ah/eax: (addr handle word) <- get line, data 4 var curr/eax: (addr word) <- lookup *word-ah 5 var curr-stream-storage: (stream byte 0x10) 6 var curr-stream/edi: (addr stream byte) <- address curr-stream-storage 7 clear-value-stack out 8 $evaluate:loop: { 9 # precondition (should never hit) 10 compare curr, 0 11 break-if-= 12 # update curr-stream 13 emit-word curr, curr-stream 14 #? print-string-to-real-screen "eval: " 15 #? print-stream-to-real-screen curr-stream 16 #? print-string-to-real-screen "\n" 17 $evaluate:process-word: { 18 ### if curr-stream is an operator, perform it 19 ## numbers 20 { 21 var add?/eax: boolean <- stream-data-equal? curr-stream, "+" 22 compare add?, 0 23 break-if-= 24 var _b/xmm0: float <- pop-number-from-value-stack out 25 var b/xmm1: float <- copy _b 26 var a/xmm0: float <- pop-number-from-value-stack out 27 a <- add b 28 push-number-to-value-stack out, a 29 break $evaluate:process-word 30 } 31 { 32 var sub?/eax: boolean <- stream-data-equal? curr-stream, "-" 33 compare sub?, 0 34 break-if-= 35 var _b/xmm0: float <- pop-number-from-value-stack out 36 var b/xmm1: float <- copy _b 37 var a/xmm0: float <- pop-number-from-value-stack out 38 a <- subtract b 39 push-number-to-value-stack out, a 40 break $evaluate:process-word 41 } 42 { 43 var mul?/eax: boolean <- stream-data-equal? curr-stream, "*" 44 compare mul?, 0 45 break-if-= 46 var _b/xmm0: float <- pop-number-from-value-stack out 47 var b/xmm1: float <- copy _b 48 var a/xmm0: float <- pop-number-from-value-stack out 49 a <- multiply b 50 push-number-to-value-stack out, a 51 break $evaluate:process-word 52 } 53 { 54 var div?/eax: boolean <- stream-data-equal? curr-stream, "/" 55 compare div?, 0 56 break-if-= 57 var _b/xmm0: float <- pop-number-from-value-stack out 58 var b/xmm1: float <- copy _b 59 var a/xmm0: float <- pop-number-from-value-stack out 60 a <- divide b 61 push-number-to-value-stack out, a 62 break $evaluate:process-word 63 } 64 { 65 var sqrt?/eax: boolean <- stream-data-equal? curr-stream, "sqrt" 66 compare sqrt?, 0 67 break-if-= 68 var a/xmm0: float <- pop-number-from-value-stack out 69 a <- square-root a 70 push-number-to-value-stack out, a 71 break $evaluate:process-word 72 } 73 ## strings/arrays 74 { 75 var len?/eax: boolean <- stream-data-equal? curr-stream, "len" 76 compare len?, 0 77 break-if-= 78 #? print-string 0, "is len\n" 79 # pop target-val from out 80 var out2/esi: (addr value-stack) <- copy out 81 var top-addr/ecx: (addr int) <- get out2, top 82 compare *top-addr, 0 83 break-if-<= 84 #? print-string 0, "stack has stuff\n" 85 var data-ah/eax: (addr handle array value) <- get out2, data 86 var data/eax: (addr array value) <- lookup *data-ah 87 var top/edx: int <- copy *top-addr 88 top <- decrement 89 var dest-offset/edx: (offset value) <- compute-offset data, top 90 var target-val/edx: (addr value) <- index data, dest-offset 91 # check target-val is a string or array 92 var target-type-addr/eax: (addr int) <- get target-val, type 93 compare *target-type-addr, 1/string 94 { 95 break-if-!= 96 # compute length 97 var src-ah/eax: (addr handle array byte) <- get target-val, text-data 98 var src/eax: (addr array byte) <- lookup *src-ah 99 var result/ebx: int <- length src 100 var result-f/xmm0: float <- convert result 101 # save result into target-val 102 var type-addr/eax: (addr int) <- get target-val, type 103 copy-to *type-addr, 0/int 104 var target-string-ah/eax: (addr handle array byte) <- get target-val, text-data 105 clear-object target-string-ah 106 var target/eax: (addr float) <- get target-val, number-data 107 copy-to *target, result-f 108 break $evaluate:process-word 109 } 110 compare *target-type-addr, 2/array 111 { 112 break-if-!= 113 # compute length 114 var src-ah/eax: (addr handle array value) <- get target-val, array-data 115 var src/eax: (addr array value) <- lookup *src-ah 116 var result/ebx: int <- length src 117 var result-f/xmm0: float <- convert result 118 # save result into target-val 119 var type-addr/eax: (addr int) <- get target-val, type 120 copy-to *type-addr, 0/int 121 var target-array-ah/eax: (addr handle array value) <- get target-val, array-data 122 clear-object target-array-ah 123 var target/eax: (addr float) <- get target-val, number-data 124 copy-to *target, result-f 125 break $evaluate:process-word 126 } 127 } 128 ## files 129 { 130 var open?/eax: boolean <- stream-data-equal? curr-stream, "open" 131 compare open?, 0 132 break-if-= 133 # pop target-val from out 134 var out2/esi: (addr value-stack) <- copy out 135 var top-addr/ecx: (addr int) <- get out2, top 136 compare *top-addr, 0 137 break-if-<=c{0: 0 (((1 string-address)) <- ((new)) hello, _) -- nil c{0: 1 (((2 string-address)) <- ((new)) abc) -- nil c{0: 2 (((3 string-address)) <- ((interpolate)) ((1 string-address)) ((2 string-address))) -- nil c{1: 0 ✓ (((1 string-address)) <- ((new)) hello, _) c{1: 1 ✓ (((2 string-address)) <- ((new)) abc) c{1: 2 ✓ (((3 string-address)) <- ((interpolate)) ((1 string-address)) ((2 string-address))) cn0: convert-names in main cn0: (((1 string-address)) <- ((new)) hello, _) nil nil cn0: checking arg hello, _ cn0: checking oarg ((1 string-address)) maybe-add: ((1 string-address)) cn0: (((2 string-address)) <- ((new)) abc) nil nil cn0: checking arg abc cn0: checking oarg ((2 string-address)) maybe-add: ((2 string-address)) cn0: (((3 string-address)) <- ((interpolate)) ((1 string-address)) ((2 string-address))) nil nil cn0: checking arg ((1 string-address)) maybe-add: ((1 string-address)) cn0: checking arg ((2 string-address)) maybe-add: ((2 string-address)) cn0: checking oarg ((3 string-address)) maybe-add: ((3 string-address)) cn1: (((1 string-address)) <- ((new)) hello, _) cn1: (((2 string-address)) <- ((new)) abc) cn1: (((3 string-address)) <- ((interpolate)) ((1 string-address)) ((2 string-address))) schedule: main run: main 0: (((1 string-address)) <- ((new)) hello, _) run: main 0: 1000 => ((1 string-address)) mem: ((1 string-address)): 1 <= 1000 run: main 1: (((2 string-address)) <- ((new)) abc) run: main 1: 1009 => ((2 string-address)) mem: ((2 string-address)): 2 <= 1009 run: main 2: (((3 string-address)) <- ((interpolate)) ((1 string-address)) ((2 string-address))) mem: ((1 string-address)) => 1000 mem: ((2 string-address)) => 1009 run: interpolate/main 0: (((default-space space-address)) <- ((new)) ((space literal)) ((60 literal))) run: interpolate/main 0: 1013 => ((default-space space-address)) run: interpolate/main 1: (((1 string-address)) <- ((next-input))) arg: nil 0 (1000 1009) run: interpolate/main 1: 1000 => ((1 string-address)) mem: ((1 string-address)): 1015 <= 1000 run: interpolate/main 2: (((2 integer)) <- ((length)) ((1 string-address) (deref))) array-len: ((1 string-address) (deref)) mem: ((1000 integer) (raw)) => 8 run: interpolate/main 2: 8 => ((2 integer)) mem: ((2 integer)): 1016 <= 8 run: interpolate/main 3: (((3 integer)) <- ((copy)) ((2 integer))) mem: ((2 integer)) => 8 run: interpolate/main 3: 8 => ((3 integer)) mem: ((3 integer)): 1017 <= 8 run: interpolate/main 4: (((4 string-address)) ((5 boolean)) <- ((next-input))) arg: nil 1 (1000 1009) run: interpolate/main 4: 1009 => ((4 string-address)) mem: ((4 string-address)): 1018 <= 1009 run: interpolate/main 4: t => ((5 boolean)) mem: ((5 boolean)): 1019 <= t run: interpolate/main 5: (((jump-unless)) ((5 boolean)) ((4 offset))) mem: ((5 boolean)) => t run: interpolate/main 6: (((6 integer)) <- ((length)) ((4 string-address) (deref))) array-len: ((4 string-address) (deref)) mem: ((1009 integer) (raw)) => 3 run: interpolate/main 6: 3 => ((6 integer)) mem: ((6 integer)): 1020 <= 3 run: interpolate/main 7: (((3 integer)) <- ((add)) ((3 integer)) ((6 integer))) mem: ((3 integer)) => 8 mem: ((6 integer)) => 3 run: interpolate/main 7: 11 => ((3 integer)) mem: ((3 integer)): 1017 <= 11 run: interpolate/main 8: (((3 integer)) <- ((subtract)) ((3 integer)) ((1 literal))) mem: ((3 integer)) => 11 run: interpolate/main 8: 10 => ((3 integer)) mem: ((3 integer)): 1017 <= 10 run: interpolate/main 9: (((jump)) ((-6 offset))) run: interpolate/main 4: (((4 string-address)) ((5 boolean)) <- ((next-input))) arg: nil 2 (1000 1009) run: interpolate/main 4: nil => ((4 string-address)) mem: ((4 string-address)): 1018 <= nil run: interpolate/main 4: nil => ((5 boolean)) mem: ((5 boolean)): 1019 <= nil run: interpolate/main 5: (((jump-unless)) ((5 boolean)) ((4 offset))) mem: ((5 boolean)) => nil run: interpolate/main 10: (_ <- ((input)) ((0 literal))) arg: (((0 literal))) 0 (1000 1009) run: interpolate/main 11: (((7 string-address)) <- ((new)) ((string literal)) ((3 integer))) mem: ((3 integer)) => 10 run: interpolate/main 11: 1074 => ((7 string-address)) mem: ((7 string-address)): 1021 <= 1074 run: interpolate/main 12: (((8 integer)) <- ((copy)) ((0 literal))) run: interpolate/main 12: 0 => ((8 integer)) mem: ((8 integer)): 1022 <= 0 run: interpolate/main 13: (((9 integer)) <- ((copy)) ((0 literal))) run: interpolate/main 13: 0 => ((9 integer)) mem: ((9 integer)): 1023 <= 0 run: interpolate/main 14: (((4 string-address)) ((5 boolean)) <- ((next-input))) arg: nil 1 (1000 1009) run: interpolate/main 14: 1009 => ((4 string-address)) mem: ((4 string-address)): 1018 <= 1009 run: interpolate/main 14: t => ((5 boolean)) mem: ((5 boolean)): 1019 <= t run: interpolate/main 15: (((jump-unless)) ((5 boolean)) ((21 offset))) mem: ((5 boolean)) => t run: interpolate/main 16: (((10 boolean)) <- ((greater-or-equal)) ((9 integer)) ((2 integer))) mem: ((9 integer)) => 0 mem: ((2 integer)) => 8 run: interpolate/main 16: nil => ((10 boolean)) mem: ((10 boolean)): 1024 <= nil run: interpolate/main 17: (((jump-if)) ((10 boolean)) ((19 offset))) mem: ((10 boolean)) => nil run: interpolate/main 18: (((11 byte)) <- ((index)) ((1 string-address) (deref)) ((9 integer))) mem: ((9 integer)) => 0 array-len: ((1000 string) (raw)) mem: ((1000 integer) (raw)) => 8 mem: ((1001 byte) (raw)) => h run: interpolate/main 18: #\h => ((11 byte)) mem: ((11 byte)): 1025 <= #\h run: interpolate/main 19: (((12 boolean)) <- ((equal)) ((11 byte)) ((_ literal))) mem: ((11 byte)) => h run: interpolate/main 19: nil => ((12 boolean)) mem: ((12 boolean)): 1026 <= nil run: interpolate/main 20: (((jump-if)) ((12 boolean)) ((5 offset))) mem: ((12 boolean)) => nil run: interpolate/main 21: (((13 byte-address)) <- ((index-address)) ((7 string-address) (deref)) ((8 integer))) mem: ((8 integer)) => 0 array-len: ((1074 string) (raw)) mem: ((1074 integer) (raw)) => 10 run: interpolate/main 21: 1075 => ((13 byte-address)) mem: ((13 byte-address)): 1027 <= 1075 run: interpolate/main 22: (((13 byte-address) (deref)) <- ((copy)) ((11 byte))) mem: ((11 byte)) => h run: interpolate/main 22: #\h => ((13 byte-address) (deref)) mem: ((13 byte-address) (deref)): 1075 <= #\h run: interpolate/main 23: (((9 integer)) <- ((add)) ((9 integer)) ((1 literal))) mem: ((9 integer)) => 0 run: interpolate/main 23: 1 => ((9 integer)) mem: ((9 integer)): 1023 <= 1 run: interpolate/main 24: (((8 integer)) <- ((add)) ((8 integer)) ((1 literal))) mem: ((8 integer)) => 0 run: interpolate/main 24: 1 => ((8 integer)) mem: ((8 integer)): 1022 <= 1 run: interpolate/main 25: (((jump)) ((-10 offset))) run: interpolate/main 16: (((10 boolean)) <- ((greater-or-equal)) ((9 integer)) ((2 integer))) mem: ((9 integer)) => 1 mem: ((2 integer)) => 8 run: interpolate/main 16: nil => ((10 boolean)) mem: ((10 boolean)): 1024 <= nil run: interpolate/main 17: (((jump-if)) ((10 boolean)) ((19 offset))) mem: ((10 boolean)) => nil run: interpolate/main 18: (((11 byte)) <- ((index)) ((1 string-address) (deref)) ((9 integer))) mem: ((9 integer)) => 1 array-len: ((1000 string) (raw)) mem: ((1000 integer) (raw)) => 8 mem: ((1002 byte) (raw)) => e run: interpolate/main 18: #\e => ((11 byte)) mem: ((11 byte)): 1025 <= #\e run: interpolate/main 19: (((12 boolean)) <- ((equal)) ((11 byte)) ((_ literal))) mem: ((11 byte)) => e run: interpolate/main 19: nil => ((12 boolean)) mem: ((12 boolean)): 1026 <= nil run: interpolate/main 20: (((jump-if)) ((12 boolean)) ((5 offset))) mem: ((12 boolean)) => nil run: interpolate/main 21: (((13 byte-address)) <- ((index-address)) ((7 string-address) (deref)) ((8 integer))) mem: ((8 integer)) => 1 array-len: ((1074 string) (raw)) mem: ((1074 integer) (raw)) => 10 run: interpolate/main 21: 1076 => ((13 byte-address)) mem: ((13 byte-address)): 1027 <= 1076 run: interpolate/main 22: (((13 byte-address) (deref)) <- ((copy)) ((11 byte))) mem: ((11 byte)) => e run: interpolate/main 22: #\e => ((13 byte-address) (deref)) mem: ((13 byte-address) (deref)): 1076 <= #\e run: interpolate/main 23: (((9 integer)) <- ((add)) ((9 integer)) ((1 literal))) mem: ((9 integer)) => 1 run: interpolate/main 23: 2 => ((9 integer)) mem: ((9 integer)): 1023 <= 2 run: interpolate/main 24: (((8 integer)) <- ((add)) ((8 integer)) ((1 literal))) mem: ((8 integer)) => 1 run: interpolate/main 24: 2 => ((8 integer)) mem: ((8 integer)): 1022 <= 2 run: interpolate/main 25: (((jump)) ((-10 offset))) run: interpolate/main 16: (((10 boolean)) <- ((greater-or-equal)) ((9 integer)) ((2 integer))) mem: ((9 integer)) => 2 mem: ((2 integer)) => 8 run: interpolate/main 16: nil => ((10 boolean)) mem: ((10 boolean)): 1024 <= nil run: interpolate/main 17: (((jump-if)) ((10 boolean)) ((19 offset))) mem: ((10 boolean)) => nil run: interpolate/main 18: (((11 byte)) <- ((index)) ((1 string-address) (deref)) ((9 integer))) mem: ((9 integer)) => 2 array-len: ((1000 string) (raw)) mem: ((1000 integer) (raw)) => 8 mem: ((1003 byte) (raw)) => l run: interpolate/main 18: #\l => ((11 byte)) mem: ((11 byte)): 1025 <= #\l run: interpolate/main 19: (((12 boolean)) <- ((equal)) ((11 byte)) ((_ literal))) mem: ((11 byte)) => l run: interpolate/main 19: nil => ((12 boolean)) mem: ((12 boolean)): 1026 <= nil run: interpolate/main 20: (((jump-if)) ((12 boolean)) ((5 offset))) mem: ((12 boolean)) => nil run: interpolate/main 21: (((13 byte-address)) <- ((index-address)) ((7 string-address) (deref)) ((8 integer))) mem: ((8 integer)) => 2 array-len: ((1074 string) (raw)) mem: ((1074 integer) (raw)) => 10 run: interpolate/main 21: 1077 => ((13 byte-address)) mem: ((13 byte-address)): 1027 <= 1077 run: interpolate/main 22: (((13 byte-address) (deref)) <- ((copy)) ((11 byte))) mem: ((11 byte)) => l run: interpolate/main 22: #\l => ((13 byte-address) (deref)) mem: ((13 byte-address) (deref)): 1077 <= #\l run: interpolate/main 23: (((9 integer)) <- ((add)) ((9 integer)) ((1 literal))) mem: ((9 integer)) => 2 run: interpolate/main 23: 3 => ((9 integer)) mem: ((9 integer)): 1023 <= 3 run: interpolate/main 24: (((8 integer)) <- ((add)) ((8 integer)) ((1 literal))) mem: ((8 integer)) => 2 run: interpolate/main 24: 3 => ((8 integer)) mem: ((8 integer)): 1022 <= 3 run: interpolate/main 25: (((jump)) ((-10 offset))) run: interpolate/main 16: (((10 boolean)) <- ((greater-or-equal)) ((9 integer)) ((2 integer))) mem: ((9 integer)) => 3 mem: ((2 integer)) => 8 run: interpolate/main 16: nil => ((10 boolean)) mem: ((10 boolean)): 1024 <= nil run: interpolate/main 17: (((jump-if)) ((10 boolean)) ((19 offset))) mem: ((10 boolean)) => nil run: interpolate/main 18: (((11 byte)) <- ((index)) ((1 string-address) (deref)) ((9 integer))) mem: ((9 integer)) => 3 array-len: ((1000 string) (raw)) mem: ((1000 integer) (raw)) => 8 mem: ((1004 byte) (raw)) => l run: interpolate/main 18: #\l => ((11 byte)) mem: ((11 byte)): 1025 <= #\l run: interpolate/main 19: (((12 boolean)) <- ((equal)) ((11 byte)) ((_ literal))) mem: ((11 byte)) => l run: interpolate/main 19: nil => ((12 boolean)) mem: ((12 boolean)): 1026 <= nil run: interpolate/main 20: (((jump-if)) ((12 boolean)) ((5 offset))) mem: ((12 boolean)) => nil run: interpolate/main 21: (((13 byte-address)) <- ((index-address)) ((7 string-address) (deref)) ((8 integer))) mem: ((8 integer)) => 3 array-len: ((1074 string) (raw)) mem: ((1074 integer) (raw)) => 10 run: interpolate/main 21: 1078 => ((13 byte-address)) mem: ((13 byte-address)): 1027 <= 1078 run: interpolate/main 22: (((13 byte-address) (deref)) <- ((copy)) ((11 byte))) mem: ((11 byte)) => l run: interpolate/main 22: #\l => ((13 byte-address) (deref)) mem: ((13 byte-address) (deref)): 1078 <= #\l run: interpolate/main 23: (((9 integer)) <- ((add)) ((9 integer)) ((1 literal))) mem: ((9 integer)) => 3 run: interpolate/main 23: 4 => ((9 integer)) mem: ((9 integer)): 1023 <= 4 run: interpolate/main 24: (((8 integer)) <- ((add)) ((8 integer)) ((1 literal))) mem: ((8 integer)) => 3 run: interpolate/main 24: 4 => ((8 integer)) mem: ((8 integer)): 1022 <= 4 run: interpolate/main 25: (((jump)) ((-10 offset))) run: interpolate/main 16: (((10 boolean)) <- ((greater-or-equal)) ((9 integer)) ((2 integer))) mem: ((9 integer)) => 4 mem: ((2 integer)) => 8 run: interpolate/main 16: nil => ((10 boolean)) mem: ((10 boolean)): 1024 <= nil run: interpolate/main 17: (((jump-if)) ((10 boolean)) ((19 offset))) mem: ((10 boolean)) => nil run: interpolate/main 18: (((11 byte)) <- ((index)) ((1 string-address) (deref)) ((9 integer))) mem: ((9 integer)) => 4 array-len: ((1000 string) (raw)) mem: ((1000 integer) (raw)) => 8 mem: ((1005 byte) (raw)) => o run: interpolate/main 18: #\o => ((11 byte)) mem: ((11 byte)): 1025 <= #\o run: interpolate/main 19: (((12 boolean)) <- ((equal)) ((11 byte)) ((_ literal))) mem: ((11 byte)) => o run: interpolate/main 19: nil => ((12 boolean)) mem: ((12 boolean)): 1026 <= nil run: interpolate/main 20: (((jump-if)) ((12 boolean)) ((5 offset))) mem: ((12 boolean)) => nil run: interpolate/main 21: (((13 byte-address)) <- ((index-address)) ((7 string-address) (deref)) ((8 integer))) mem: ((8 integer)) => 4 array-len: ((1074 string) (raw)) mem: ((1074 integer) (raw)) => 10 run: interpolate/main 21: 1079 => ((13 byte-address)) mem: ((13 byte-address)): 1027 <= 1079 run: interpolate/main 22: (((13 byte-address) (deref)) <- ((copy)) ((11 byte))) mem: ((11 byte)) => o run: interpolate/main 22: #\o => ((13 byte-address) (deref)) mem: ((13 byte-address) (deref)): 1079 <= #\o run: interpolate/main 23: (((9 integer)) <- ((add)) ((9 integer)) ((1 literal))) mem: ((9 integer)) => 4 run: interpolate/main 23: 5 => ((9 integer)) mem: ((9 integer)): 1023 <= 5 run: interpolate/main 24: (((8 integer)) <- ((add)) ((8 integer)) ((1 literal))) mem: ((8 integer)) => 4 run: interpolate/main 24: 5 => ((8 integer)) mem: ((8 integer)): 1022 <= 5 run: interpolate/main 25: (((jump)) ((-10 offset))) run: interpolate/main 16: (((10 boolean)) <- ((greater-or-equal)) ((9 integer)) ((2 integer))) mem: ((9 integer)) => 5 mem: ((2 integer)) => 8 run: interpolate/main 16: nil => ((10 boolean)) mem: ((10 boolean)): 1024 <= nil run: interpolate/main 17: (((jump-if)) ((10 boolean)) ((19 offset))) mem: ((10 boolean)) => nil run: interpolate/main 18: (((11 byte)) <- ((index)) ((1 string-address) (deref)) ((9 integer))) mem: ((9 integer)) => 5 array-len: ((1000 string) (raw)) mem: ((1000 integer) (raw)) => 8 mem: ((1006 byte) (raw)) => , run: interpolate/main 18: #\, => ((11 byte)) mem: ((11 byte)): 1025 <= #\, run: interpolate/main 19: (((12 boolean)) <- ((equal)) ((11 byte)) ((_ literal))) mem: ((11 byte)) => , run: interpolate/main 19: nil => ((12 boolean)) mem: ((12 boolean)): 1026 <= nil run: interpolate/main 20: (((jump-if)) ((12 boolean)) ((5 offset))) mem: ((12 boolean)) => nil run: interpolate/main 21: (((13 byte-address)) <- ((index-address)) ((7 string-address) (deref)) ((8 integer))) mem: ((8 integer)) => 5 array-len: ((1074 string) (raw)) mem: ((1074 integer) (raw)) => 10 run: interpolate/main 21: 1080 => ((13 byte-address)) mem: ((13 byte-address)): 1027 <= 1080 run: interpolate/main 22: (((13 byte-address) (deref)) <- ((copy)) ((11 byte))) mem: ((11 byte)) => , run: interpolate/main 22: #\, => ((13 byte-address) (deref)) mem: ((13 byte-address) (deref)): 1080 <= #\, run: interpolate/main 23: (((9 integer)) <- ((add)) ((9 integer)) ((1 literal))) mem: ((9 integer)) => 5 run: interpolate/main 23: 6 => ((9 integer)) mem: ((9 integer)): 1023 <= 6 run: interpolate/main 24: (((8 integer)) <- ((add)) ((8 integer)) ((1 literal))) mem: ((8 integer)) => 5 run: interpolate/main 24: 6 => ((8 integer)) mem: ((8 integer)): 1022 <= 6 run: interpolate/main 25: (((jump)) ((-10 offset))) run: interpolate/main 16: (((10 boolean)) <- ((greater-or-equal)) ((9 integer)) ((2 integer))) mem: ((9 integer)) => 6 mem: ((2 integer)) => 8 run: interpolate/main 16: nil => ((10 boolean)) mem: ((10 boolean)): 1024 <= nil run: interpolate/main 17: (((jump-if)) ((10 boolean)) ((19 offset))) mem: ((10 boolean)) => nil run: interpolate/main 18: (((11 byte)) <- ((index)) ((1 string-address) (deref)) ((9 integer))) mem: ((9 integer)) => 6 array-len: ((1000 string) (raw)) mem: ((1000 integer) (raw)) => 8 mem: ((1007 byte) (raw)) => run: interpolate/main 18: #\space => ((11 byte)) mem: ((11 byte)): 1025 <= #\space run: interpolate/main 19: (((12 boolean)) <- ((equal)) ((11 byte)) ((_ literal))) mem: ((11 byte)) => run: interpolate/main 19: nil => ((12 boolean)) mem: ((12 boolean)): 1026 <= nil run: interpolate/main 20: (((jump-if)) ((12 boolean)) ((5 offset))) mem: ((12 boolean)) => nil run: interpolate/main 21: (((13 byte-address)) <- ((index-address)) ((7 string-address) (deref)) ((8 integer))) mem: ((8 integer)) => 6 array-len: ((1074 string) (raw)) mem: ((1074 integer) (raw)) => 10 run: interpolate/main 21: 1081 => ((13 byte-address)) mem: ((13 byte-address)): 1027 <= 1081 run: interpolate/main 22: (((13 byte-address) (deref)) <- ((copy)) ((11 byte))) mem: ((11 byte)) => run: interpolate/main 22: #\space => ((13 byte-address) (deref)) mem: ((13 byte-address) (deref)): 1081 <= #\space run: interpolate/main 23: (((9 integer)) <- ((add)) ((9 integer)) ((1 literal))) mem: ((9 integer)) => 6 run: interpolate/main 23: 7 => ((9 integer)) mem: ((9 integer)): 1023 <= 7 run: interpolate/main 24: (((8 integer)) <- ((add)) ((8 integer)) ((1 literal))) mem: ((8 integer)) => 6 run: interpolate/main 24: 7 => ((8 integer)) mem: ((8 integer)): 1022 <= 7 run: interpolate/main 25: (((jump)) ((-10 offset))) run: interpolate/main 16: (((10 boolean)) <- ((greater-or-equal)) ((9 integer)) ((2 integer))) mem: ((9 integer)) => 7 mem: ((2 integer)) => 8 run: interpolate/main 16: nil => ((10 boolean)) mem: ((10 boolean)): 1024 <= nil run: interpolate/main 17: (((jump-if)) ((10 boolean)) ((19 offset))) mem: ((10 boolean)) => nil run: interpolate/main 18: (((11 byte)) <- ((index)) ((1 string-address) (deref)) ((9 integer))) mem: ((9 integer)) => 7 array-len: ((1000 string) (raw)) mem: ((1000 integer) (raw)) => 8 mem: ((1008 byte) (raw)) => _ run: interpolate/main 18: #\_ => ((11 byte)) mem: ((11 byte)): 1025 <= #\_ run: interpolate/main 19: (((12 boolean)) <- ((equal)) ((11 byte)) ((_ literal))) mem: ((11 byte)) => _ run: interpolate/main 19: t => ((12 boolean)) mem: ((12 boolean)): 1026 <= t run: interpolate/main 20: (((jump-if)) ((12 boolean)) ((5 offset))) mem: ((12 boolean)) => t run: interpolate/main 26: (((14 integer)) <- ((copy)) ((0 literal))) run: interpolate/main 26: 0 => ((14 integer)) mem: ((14 integer)): 1028 <= 0 run: interpolate/main 27: (((15 boolean)) <- ((greater-or-equal)) ((14 integer)) ((6 integer))) mem: ((14 integer)) => 0 mem: ((6 integer)) => 3 run: interpolate/main 27: nil => ((15 boolean)) mem: ((15 boolean)): 1029 <= nil run: interpolate/main 28: (((jump-if)) ((15 boolean)) ((6 offset))) mem: ((15 boolean)) => nil run: interpolate/main 29: (((11 byte)) <- ((index)) ((4 string-address) (deref)) ((14 integer))) mem: ((14 integer)) => 0 array-len: ((1009 string) (raw)) mem: ((1009 integer) (raw)) => 3 mem: ((1010 byte) (raw)) => a run: interpolate/main 29: #\a => ((11 byte)) mem: ((11 byte)): 1025 <= #\a run: interpolate/main 30: (((13 byte-address)) <- ((index-address)) ((7 string-address) (deref)) ((8 integer))) mem: ((8 integer)) => 7 array-len: ((1074 string) (raw)) mem: ((1074 integer) (raw)) => 10 run: interpolate/main 30: 1082 => ((13 byte-address)) mem: ((13 byte-address)): 1027 <= 1082 run: interpolate/main 31: (((13 byte-address) (deref)) <- ((copy)) ((11 byte))) mem: ((11 byte)) => a run: interpolate/main 31: #\a => ((13 byte-address) (deref)) mem: ((13 byte-address) (deref)): 1082 <= #\a run: interpolate/main 32: (((14 integer)) <- ((add)) ((14 integer)) ((1 literal))) mem: ((14 integer)) => 0 run: interpolate/main 32: 1 => ((14 integer)) mem: ((14 integer)): 1028 <= 1 run: interpolate/main 33: (((8 integer)) <- ((add)) ((8 integer)) ((1 literal))) mem: ((8 integer)) => 7 run: interpolate/main 33: 8 => ((8 integer)) mem: ((8 integer)): 1022 <= 8 run: interpolate/main 34: (((jump)) ((-8 offset))) run: interpolate/main 27: (((15 boolean)) <- ((greater-or-equal)) ((14 integer)) ((6 integer))) mem: ((14 integer)) => 1 mem: ((6 integer)) => 3 run: interpolate/main 27: nil => ((15 boolean)) mem: ((15 boolean)): 1029 <= nil run: interpolate/main 28: (((jump-if)) ((15 boolean)) ((6 offset))) mem: ((15 boolean)) => nil run: interpolate/main 29: (((11 byte)) <- ((index)) ((4 string-address) (deref)) ((14 integer))) mem: ((14 integer)) => 1 array-len: ((1009 string) (raw)) mem: ((1009 integer) (raw)) => 3 mem: ((1011 byte) (raw)) => b run: interpolate/main 29: #\b => ((11 byte)) mem: ((11 byte)): 1025 <= #\b run: interpolate/main 30: (((13 byte-address)) <- ((index-address)) ((7 string-address) (deref)) ((8 integer))) mem: ((8 integer)) => 8 array-len: ((1074 string) (raw)) mem: ((1074 integer) (raw)) => 10 run: interpolate/main 30: 1083 => ((13 byte-address)) mem: ((13 byte-address)): 1027 <= 1083 run: interpolate/main 31: (((13 byte-address) (deref)) <- ((copy)) ((11 byte))) mem: ((11 byte)) => b run: interpolate/main 31: #\b => ((13 byte-address) (deref)) mem: ((13 byte-address) (deref)): 1083 <= #\b run: interpolate/main 32: (((14 integer)) <- ((add)) ((14 integer)) ((1 literal))) mem: ((14 integer)) => 1 run: interpolate/main 32: 2 => ((14 integer)) mem: ((14 integer)): 1028 <= 2 run: interpolate/main 33: (((8 integer)) <- ((add)) ((8 integer)) ((1 literal))) mem: ((8 integer)) => 8 run: interpolate/main 33: 9 => ((8 integer)) mem: ((8 integer)): 1022 <= 9 run: interpolate/main 34: (((jump)) ((-8 offset))) run: interpolate/main 27: (((15 boolean)) <- ((greater-or-equal)) ((14 integer)) ((6 integer))) mem: ((14 integer)) => 2 mem: ((6 integer)) => 3 run: interpolate/main 27: nil => ((15 boolean)) mem: ((15 boolean)): 1029 <= nil run: interpolate/main 28: (((jump-if)) ((15 boolean)) ((6 offset))) mem: ((15 boolean)) => nil run: interpolate/main 29: (((11 byte)) <- ((index)) ((4 string-address) (deref)) ((14 integer))) mem: ((14 integer)) => 2 array-len: ((1009 string) (raw)) mem: ((1009 integer) (raw)) => 3 mem: ((1012 byte) (raw)) => c run: interpolate/main 29: #\c => ((11 byte)) mem: ((11 byte)): 1025 <= #\c run: interpolate/main 30: (((13 byte-address)) <- ((index-address)) ((7 string-address) (deref)) ((8 integer))) mem: ((8 integer)) => 9 array-len: ((1074 string) (raw)) mem: ((1074 integer) (raw)) => 10 run: interpolate/main 30: 1084 => ((13 byte-address)) mem: ((13 byte-address)): 1027 <= 1084 run: interpolate/main 31: (((13 byte-address) (deref)) <- ((copy)) ((11 byte))) mem: ((11 byte)) => c run: interpolate/main 31: #\c => ((13 byte-address) (deref)) mem: ((13 byte-address) (deref)): 1084 <= #\c run: interpolate/main 32: (((14 integer)) <- ((add)) ((14 integer)) ((1 literal))) mem: ((14 integer)) => 2 run: interpolate/main 32: 3 => ((14 integer)) mem: ((14 integer)): 1028 <= 3 run: interpolate/main 33: (((8 integer)) <- ((add)) ((8 integer)) ((1 literal))) mem: ((8 integer)) => 9 run: interpolate/main 33: 10 => ((8 integer)) mem: ((8 integer)): 1022 <= 10 run: interpolate/main 34: (((jump)) ((-8 offset))) run: interpolate/main 27: (((15 boolean)) <- ((greater-or-equal)) ((14 integer)) ((6 integer))) mem: ((14 integer)) => 3 mem: ((6 integer)) => 3 run: interpolate/main 27: t => ((15 boolean)) mem: ((15 boolean)): 1029 <= t run: interpolate/main 28: (((jump-if)) ((15 boolean)) ((6 offset))) mem: ((15 boolean)) => t run: interpolate/main 35: (((9 integer)) <- ((add)) ((9 integer)) ((1 literal))) mem: ((9 integer)) => 7 run: interpolate/main 35: 8 => ((9 integer)) mem: ((9 integer)): 1023 <= 8 run: interpolate/main 36: (((jump)) ((-23 offset))) run: interpolate/main 14: (((4 string-address)) ((5 boolean)) <- ((next-input))) arg: nil 2 (1000 1009) run: interpolate/main 14: nil => ((4 string-address)) mem: ((4 string-address)): 1018 <= nil run: interpolate/main 14: nil => ((5 boolean)) mem: ((5 boolean)): 1019 <= nil run: interpolate/main 15: (((jump-unless)) ((5 boolean)) ((21 offset))) mem: ((5 boolean)) => nil run: interpolate/main 37: (((10 boolean)) <- ((greater-or-equal)) ((9 integer)) ((2 integer))) mem: ((9 integer)) => 8 mem: ((2 integer)) => 8 run: interpolate/main 37: t => ((10 boolean)) mem: ((10 boolean)): 1024 <= t run: interpolate/main 38: (((jump-if)) ((10 boolean)) ((6 offset))) mem: ((10 boolean)) => t run: interpolate/main 45: (((reply)) ((7 string-address))) mem: ((7 string-address)) => 1074 run: main 2: 1074 => ((3 string-address)) mem: ((3 string-address)): 3 <= 1074 schedule: done with routine nil