|
|
@@ -255,47 +255,47 @@
|
|
|
# stores that used to wrap to [BP+0]/[BP+1] and fit the disp8
|
|
|
# form are now disp16 - two bytes, hence 217. See t40.
|
|
|
|
|
|
-t01_minimal OK 29 4
|
|
|
-t02_writeln OK 38 4
|
|
|
-t03_inline_comment OK 38 4
|
|
|
-t04_var OK 48 6
|
|
|
-t05_own_line_comment OK 38 4
|
|
|
-t06_two_args OK 52 4
|
|
|
-t07_big OK 102 6
|
|
|
-t08_const OK 76 7
|
|
|
-t09_if OK 195 6
|
|
|
-t10_while OK 151 6
|
|
|
-t11_for OK 144 6
|
|
|
-t12_repeat OK 137 6
|
|
|
-t13_proc OK 126 6
|
|
|
-t14_types OK 41 15
|
|
|
-t15_label OK 90 6
|
|
|
-t16_str1 OK 42 4
|
|
|
-t17_two_str OK 45 4
|
|
|
-t18_writeln_bare OK 32 4
|
|
|
-t19_int1 OK 42 4
|
|
|
-t20_str3 OK 62 4
|
|
|
-t21_mixed OK 62 4
|
|
|
-t22_case OK 94 6
|
|
|
-t23_str_empty OK 36 4
|
|
|
-t24_str_quote OK 41 4
|
|
|
+t01_minimal OK 34 5
|
|
|
+t02_writeln OK 43 5
|
|
|
+t03_inline_comment OK 43 5
|
|
|
+t04_var OK 53 7
|
|
|
+t05_own_line_comment OK 43 5
|
|
|
+t06_two_args OK 57 5
|
|
|
+t07_big OK 107 7
|
|
|
+t08_const OK 81 8
|
|
|
+t09_if OK 200 7
|
|
|
+t10_while OK 156 7
|
|
|
+t11_for OK 149 7
|
|
|
+t12_repeat OK 142 7
|
|
|
+t13_proc OK 131 7
|
|
|
+t14_types OK 46 16
|
|
|
+t15_label OK 95 7
|
|
|
+t16_str1 OK 47 5
|
|
|
+t17_two_str OK 50 5
|
|
|
+t18_writeln_bare OK 37 5
|
|
|
+t19_int1 OK 47 5
|
|
|
+t20_str3 OK 67 5
|
|
|
+t21_mixed OK 67 5
|
|
|
+t22_case OK 99 7
|
|
|
+t23_str_empty OK 41 5
|
|
|
+t24_str_quote OK 46 5
|
|
|
t25_str_as_value ERR 102 48
|
|
|
-t26_str_mixed_args OK 58 4
|
|
|
-t27_localvar OK 256 6
|
|
|
-t28_farparam OK 153 8
|
|
|
-t29_readln OK 82 7
|
|
|
-t30_forloop OK 97 8
|
|
|
-t31_procparam OK 69 6
|
|
|
-t32_forexit OK 138 8
|
|
|
-t33_cmpops OK 404 12
|
|
|
-t34_arith OK 448 8
|
|
|
-t35_not OK 224 7
|
|
|
-t36_argclobber OK 492 12
|
|
|
-t37_readbyte OK 139 7
|
|
|
+t26_str_mixed_args OK 63 5
|
|
|
+t27_localvar OK 261 7
|
|
|
+t28_farparam OK 158 9
|
|
|
+t29_readln OK 87 8
|
|
|
+t30_forloop OK 102 9
|
|
|
+t31_procparam OK 74 7
|
|
|
+t32_forexit OK 143 9
|
|
|
+t33_cmpops OK 409 13
|
|
|
+t34_arith OK 453 9
|
|
|
+t35_not OK 229 8
|
|
|
+t36_argclobber OK 497 13
|
|
|
+t37_readbyte OK 144 8
|
|
|
t38_readbool ERR 66 659
|
|
|
-t39_strvar OK 217 15
|
|
|
-t40_readln OK 163 15
|
|
|
-t41_strassign OK 263 51
|
|
|
+t39_strvar OK 222 16
|
|
|
+t40_readln OK 168 16
|
|
|
+t41_strassign OK 268 52
|
|
|
# t42_multidecl multi-name declarations in both spellings: `var a, b, c :
|
|
|
# integer', `procedure add3 (x, y, z : integer)' and
|
|
|
# `procedure mix (u, v : integer ; w : integer)' (TP3's
|
|
|
@@ -303,7 +303,7 @@ t41_strassign OK 263 51
|
|
|
# older `p : integer, q : integer' form. data=12 is the four
|
|
|
# 2-byte globals a,b,c,d plus the two @@T temporaries; the
|
|
|
# .out proves each name landed on its own slot.
|
|
|
-t42_multidecl OK 304 12
|
|
|
+t42_multidecl OK 309 13
|
|
|
uierror ERR 41 331
|
|
|
# t43_codewindow a program whose code exceeds the 4 KiB window between the
|
|
|
# end of the runtime and the data base (runtime + 1000h). It
|
|
|
@@ -323,13 +323,13 @@ t43_codewindow ERR 98 4978
|
|
|
# string[10] (11 bytes), the char c (1) and two @@T temps.
|
|
|
# The fix also had to drop ParseAtom's `r.boff := 0` after
|
|
|
# ParseVar, which had been discarding every subscript.
|
|
|
-t44_strindex OK 258 16
|
|
|
+t44_strindex OK 263 17
|
|
|
# t45_strindex_read readln (s[i]) reads one character into position i; the
|
|
|
# reader classifies by arg.cls (TChar for an indexed string)
|
|
|
# and pushes off+boff. data=15 is the global string[10]
|
|
|
# (11 bytes) plus two @@T temps. t45_strindex_read.in feeds
|
|
|
# 'X' then 'Y'.
|
|
|
-t45_strindex_read OK 134 15
|
|
|
+t45_strindex_read OK 139 16
|
|
|
# t46_strindex_var s[i] with a VARIABLE index, both directions and in both
|
|
|
# registers. ParseSub used to accept a constant only (ENoLib
|
|
|
# otherwise, exactly as for an array), because off+i is a
|
|
|
@@ -344,14 +344,14 @@ t45_strindex_read OK 134 15
|
|
|
# destination is saved across the source. data=31 is g and h
|
|
|
# (string[10] = 11 each), i and j (4), c (1), and the two @@T
|
|
|
# temporaries (4).
|
|
|
-t46_strindex_var OK 578 31
|
|
|
+t46_strindex_var OK 583 32
|
|
|
# t47_strindex_var_read readln (g[i]) with a variable i. The reader needs
|
|
|
# the computed address, not a folded off+boff, so IoCall
|
|
|
# pushes DI (57) instead of LEA AX,[off] in that case.
|
|
|
# data=15 is the global string[8] (9 bytes) plus i (2) and the
|
|
|
# two @@T temporaries (4). t47_strindex_var_read.in feeds
|
|
|
# 'X' into g[3] then 'Y' into g[6].
|
|
|
-t47_strindex_var_read OK 188 15
|
|
|
+t47_strindex_var_read OK 193 16
|
|
|
# t48_strcmp string = <> < <= > >=, both operands string
|
|
|
# VARIABLES, i.e. string-vs-string (a string SUBSCRIPT s[i] is
|
|
|
# a CHAR, so s[i] = c would be a scalar compare). Five
|
|
|
@@ -366,7 +366,7 @@ t47_strindex_var_read OK 188 15
|
|
|
# min(len)=0 arm. code=1905 is 5*6 branch compares plus the
|
|
|
# 6 value compares of the final writeln; data=24 is a and b
|
|
|
# (string[8] = 9 each), n (2), and the two @@T temporaries (4).
|
|
|
-t48_strcmp OK 1905 24
|
|
|
+t48_strcmp OK 1910 25
|
|
|
# t49_strcmp_lit the same operators with a string LITERAL in one or
|
|
|
# both positions. A literal has no storage and the image
|
|
|
# carries no initialised data, so PushStrAddr emits it inline
|
|
|
@@ -375,7 +375,7 @@ t48_strcmp OK 1905 24
|
|
|
# operands literal, including '' on both sides; the last line
|
|
|
# takes the empty literal's relation as a VALUE. data=15 is s
|
|
|
# (string[8] = 9), n (2), and the two @@T temporaries (4).
|
|
|
-t49_strcmp_lit OK 1006 15
|
|
|
+t49_strcmp_lit OK 1011 16
|
|
|
# t50_strcmp_type s = 'a' where s is a string: a one-character literal
|
|
|
# is a CHAR constant in ISO Modula-2, not a string, so this
|
|
|
# mixes TString with TScalar and ParseCmp rejects it. (''
|
|
|
@@ -392,14 +392,14 @@ t50_strcmp_type ERR 56 600
|
|
|
# scratches (7*256), the three CHAR operands ('!', and ch in
|
|
|
# a+ch and in ch+a) at 2 bytes each, and the two @@T
|
|
|
# temporaries (4).
|
|
|
-t51_strcat OK 537 1842
|
|
|
+t51_strcat OK 542 1843
|
|
|
# t52_strcat_nest nested concatenations - left-associative, so `a+b+'!''
|
|
|
# is two occurrences and two scratches - plus a concatenation
|
|
|
# as a comparison operand and a string ELEMENT as the left
|
|
|
# operand of `+'. data=1574 is a,b (13 each), the six
|
|
|
# scratches (6*256), the four CHAR operands ('!', '<', '>',
|
|
|
# a[2]) at 2 bytes each, and the two @@T temporaries (4).
|
|
|
-t52_strcat_nest OK 501 1574
|
|
|
+t52_strcat_nest OK 506 1575
|
|
|
# t53_strcat_type `'a' + 'b'': two CHARs under `+' is a type error. A
|
|
|
# CHAR is a string operand, so `'a' + b' concatenates; BOTH
|
|
|
# operands being CHARs, with no STRING on either side, is the
|
|
|
@@ -423,7 +423,7 @@ t54_strcat_strnum ERR 56 463
|
|
|
# `after' a truncating implementation would have printed.
|
|
|
# data=516 is s (the default string = 256), one scratch
|
|
|
# (256), and the two @@T temporaries (4).
|
|
|
-t55_strcat_overflow OK 126 516
|
|
|
+t55_strcat_overflow OK 131 517
|
|
|
# t56_include {$I t56_include.inc} - the include is expanded
|
|
|
# before parsing (ExpandIncludes), so FromInclude, which
|
|
|
# exists only in the .inc, is a real symbol here. The .inc
|
|
|
@@ -433,7 +433,7 @@ t55_strcat_overflow OK 126 516
|
|
|
# two @@T temporaries); the .out is `7', which is the
|
|
|
# INCLUDED procedure actually running, so this is not just
|
|
|
# "the name resolved".
|
|
|
-t56_include OK 56 4
|
|
|
+t56_include OK 61 5
|
|
|
# t57_include_missing {$I t57_this_file_does_not_exist.inc}: an include
|
|
|
# that cannot be opened is TP3 error 90 ("File not found",
|
|
|
# TPSRC10 cdincl errb) AT THE DIRECTIVE - not a silent
|
|
|
@@ -454,7 +454,7 @@ t58_include_nest ERR 96 43
|
|
|
# also needs RdConst to read TRUE/FALSE, which it now does.
|
|
|
# A structured typed constant (set/array) is still ENoLib -
|
|
|
# it needs initialised storage this compiler lacks.
|
|
|
-t59_typedconst OK 65 4
|
|
|
+t59_typedconst OK 70 5
|
|
|
# t60_charcaret `^M' and `#27' - CALC.PAS:113 is `EofLine = ^M'. Both
|
|
|
# are unquoted CHARACTER constants, so ParseAtom must accept
|
|
|
# them as literals (not only RdConst in a declaration), or
|
|
|
@@ -462,7 +462,7 @@ t59_typedconst OK 65 4
|
|
|
# bytes 0D 1B, which is the proof they are characters and not
|
|
|
# the text "13"/"27"; the last two lines check the values
|
|
|
# (EofLine = ^M, Esc = 27).
|
|
|
-t60_charcaret OK 75 4
|
|
|
+t60_charcaret OK 80 5
|
|
|
# t61_setconst `Numbers : set of Char = ['0'..'9']' - CALC.PAS:114.
|
|
|
# TP3's HYBRID set layout (coeur-tp-ocr 4.7.2): only the whole
|
|
|
# bytes covering the base range are stored, element e is bit
|
|
|
@@ -476,7 +476,7 @@ t60_charcaret OK 75 4
|
|
|
# TRUE - the constant, an inline literal, and a two-range
|
|
|
# literal. data=4 is the @@T temporaries; the set's 32 bytes
|
|
|
# are in the code stream, not the data area.
|
|
|
-t61_setconst OK 183 4
|
|
|
+t61_setconst OK 188 5
|
|
|
# t62_enum `Attributes = (Constant, Formula, Txt, ...)' -
|
|
|
# CALC.PAS:120. Each enumerator is a constant holding its
|
|
|
# ordinal position; the TYPE is one byte and carries its
|
|
|
@@ -484,7 +484,7 @@ t61_setconst OK 183 4
|
|
|
# (vs 32 for `set of Char'). A named constant may now be a
|
|
|
# set element (RdConst resolved identifiers), which is what
|
|
|
# `[Constant, Formula]' needs. .out TRUE FALSE TRUE FALSE.
|
|
|
-t62_enum OK 187 5
|
|
|
+t62_enum OK 192 6
|
|
|
# t63_record `CellRec = record ... end' - CALC.PAS:126. Fields
|
|
|
# are non-compacted and juxtaposed; CellRec is 1 (set of
|
|
|
# Attributes) + 71 (String[70]) + 6 (Real) + 1 + 1 (two
|
|
|
@@ -492,7 +492,7 @@ t62_enum OK 187 5
|
|
|
# data=84 = 80 + the two @@T temporaries, so this row pins
|
|
|
# the layout to the byte. Subrange sizing is part of it.
|
|
|
# Field SELECTION is still a loud error (the next increment).
|
|
|
-t63_record OK 57 84
|
|
|
+t63_record OK 62 85
|
|
|
# t64_arrays the 2-D array TYPE and an array TYPED CONSTANT -
|
|
|
# CALC.PAS:133 and :137. Ranges are row-major, last fastest,
|
|
|
# both kept in an ArrRec the symbol points at. Sheet is
|
|
|
@@ -502,7 +502,7 @@ t63_record OK 57 84
|
|
|
# @@T temporaries, with XPOS in the code stream. Compile
|
|
|
# only: the image is ~16 KB and the exec harness's boot
|
|
|
# sector reads 8 KB (see the layout/execution stage).
|
|
|
-t64_arrays OK 67 11764
|
|
|
+t64_arrays OK 72 11765
|
|
|
# t65_array_access array ELEMENT and record FIELD access - the width
|
|
|
# matters. `v[1] := 11' folds (1 - 1) * 2 into the address
|
|
|
# and writes TWO bytes; `v[3] := v[1] + v[2]' reads two and
|
|
|
@@ -510,7 +510,7 @@ t64_arrays OK 67 11764
|
|
|
# its width. .out is 33 then 12, so a wrong scaling, a wrong
|
|
|
# lower-bound subtraction or a wrong store width all show up.
|
|
|
# data=16 = v (8) + r (4) + the two @@T temporaries.
|
|
|
-t65_array_access OK 101 16
|
|
|
+t65_array_access OK 106 17
|
|
|
# t66_files `text' and `file of T' - CALC.PAS:144. A file
|
|
|
# variable is our control block (FileVarSize = 4: DOS handle
|
|
|
# + mode), because this runtime does unbuffered INT 21h I/O
|
|
|
@@ -518,7 +518,7 @@ t65_array_access OK 101 16
|
|
|
# element type for the record size a Read/Write moves.
|
|
|
# data=12 = two file variables (4 each) + the two @@T
|
|
|
# temporaries. File OPERATIONS are the next increment.
|
|
|
-t66_files OK 50 12
|
|
|
+t66_files OK 55 13
|
|
|
# t67_strparam a STRING VALUE parameter - CALC.INC:17. TP3 puts a
|
|
|
# value parameter's whole size on the stack, so a string[20]
|
|
|
# parameter is 21 bytes and the caller COPIES <len><chars>
|
|
|
@@ -527,13 +527,13 @@ t66_files OK 50 12
|
|
|
# caller's t still prints `hello', so it is a copy and not an
|
|
|
# address; a literal argument is copied too. data=25 = t (21)
|
|
|
# + the @@T temporaries; the slot lives on the stack.
|
|
|
-t67_strparam OK 189 25
|
|
|
+t67_strparam OK 194 26
|
|
|
# t68_length LENGTH(s) - the first string builtin FUNCTION.
|
|
|
# CALC.INC:20 uses it in `(80-Length(S)) div 2'. Inline:
|
|
|
# the length byte at [addr], no runtime entry. A literal
|
|
|
# argument is emitted inline and its byte read there. .out
|
|
|
# is 5/3/0 (a variable, a literal, the empty string).
|
|
|
-t68_length OK 122 25
|
|
|
+t68_length OK 127 26
|
|
|
# t69_crt ClrScr and GotoXY - CALC.INC:32,35,46. Builtins
|
|
|
# (no unit system) emitting real INT 10h code: clear the
|
|
|
# window + home the cursor, and set the cursor from a 1-based
|
|
|
@@ -541,13 +541,20 @@ t68_length OK 122 25
|
|
|
# refused with ENoLib - loud, not inert. EXECUTED under both
|
|
|
# oracles: Exec86 now provides INT 10h (cursor tracked, screen
|
|
|
# calls no-ops), so the same image must print `crt' there and
|
|
|
-# under qemu. code=102 pins the sequences, data=4 the @@T
|
|
|
-# temporaries.
|
|
|
-t69_crt OK 119 4
|
|
|
+# under qemu. NormVideo/LowVideo set the attribute the clears
|
|
|
+# use (a tracked byte, +1 data); Delay is a busy loop.
|
|
|
+t69_crt OK 158 5
|
|
|
# t70_kbd `Read(Kbd, Ch)' - a READ with a leading FILE
|
|
|
# argument. Kbd is the console keyboard; the runtime's read
|
|
|
# entries already read the console, so the file is dropped and
|
|
|
# the rest is `Read(Ch)'. A real file there is a loud
|
|
|
# ENoLib. .in `Z', .out `Z' + CRLF. data=5 = ch (1) + the
|
|
|
# @@T temporaries.
|
|
|
-t70_kbd OK 55 5
|
|
|
+t70_kbd OK 60 6
|
|
|
+# t71_repeat_seq a REPEAT body with MORE THAN ONE statement. The
|
|
|
+# parser called Statmnt once and then demanded UNTIL, so
|
|
|
+# `repeat a; b until c' was ENoSemi at the first ';'.
|
|
|
+# t12_repeat's bodies are single statements, so this stayed
|
|
|
+# hidden; CALC.INC's Flash does it. RED before the fix
|
|
|
+# (ERR 1), green after; .out is 6.
|
|
|
+t71_repeat_seq OK 106 7
|