ForthHub/forth

FILL MOVE

drom opened this issue · 0 comments

drom commented
CREATE FBUF 00 C, 00 C, 00 C,
CREATE SBUF 12 C, 34 C, 56 C,
: SEEBUF FBUF C@  FBUF CHAR+ C@  FBUF CHAR+ CHAR+ C@ ;

T{ FBUF 0 20 FILL -> }T
T{ SEEBUF -> 00 00 00 }T

T{ FBUF 1 20 FILL -> }T
T{ SEEBUF -> 20 00 00 }T

T{ FBUF 3 20 FILL -> }T
T{ SEEBUF -> 20 20 20 }T

T{ FBUF FBUF 3 CHARS MOVE -> }T     \ BIZARRE SPECIAL CASE
T{ SEEBUF -> 20 20 20 }T

T{ SBUF FBUF 0 CHARS MOVE -> }T
T{ SEEBUF -> 20 20 20 }T

T{ SBUF FBUF 1 CHARS MOVE -> }T
T{ SEEBUF -> 12 20 20 }T

T{ SBUF FBUF 3 CHARS MOVE -> }T
T{ SEEBUF -> 12 34 56 }T

T{ FBUF FBUF CHAR+ 2 CHARS MOVE -> }T
T{ SEEBUF -> 12 12 34 }T

T{ FBUF CHAR+ FBUF 2 CHARS MOVE -> }T
T{ SEEBUF -> 12 34 34 }T

Errors:

Error: in line: 926 T{ FBUF 0 20 FILL -> }T  expected [ 172, 0, 32 ] to deeply equal [].
.
Error: in line: 929 T{ FBUF 1 20 FILL -> }T  expected [ 172, 1, 32 ] to deeply equal [].
Error: in line: 930 T{ SEEBUF -> 20 00 00 }T  expected [ 0, 0, 0 ] to deeply equal [ 32, 0, 0 ].
Error: in line: 932 T{ FBUF 3 20 FILL -> }T  expected [ 172, 3, 32 ] to deeply equal [].
Error: in line: 933 T{ SEEBUF -> 20 20 20 }T  expected [ 0, 0, 0 ] to deeply equal [ 32, 32, 32 ].
Error: in line: 934  T{ FBUF FBUF 3 CHARS MOVE -> }T     expected [ 172, 172, 3 ] to deeply equal [].
Error: in line: 936 T{ SEEBUF -> 20 20 20 }T  expected [ 0, 0, 0 ] to deeply equal [ 32, 32, 32 ].
Error: in line: 938 T{ SBUF FBUF 0 CHARS MOVE -> }T  expected [ 175, 172, 0 ] to deeply equal [].
Error: in line: 939 T{ SEEBUF -> 20 20 20 }T  expected [ 0, 0, 0 ] to deeply equal [ 32, 32, 32 ].
Error: in line: 941 T{ SBUF FBUF 1 CHARS MOVE -> }T  expected [ 175, 172, 1 ] to deeply equal [].
Error: in line: 942 T{ SEEBUF -> 12 20 20 }T  expected [ 0, 0, 0 ] to deeply equal [ 18, 32, 32 ].
Error: in line: 944 T{ SBUF FBUF 3 CHARS MOVE -> }T  expected [ 175, 172, 3 ] to deeply equal [].
Error: in line: 945 T{ SEEBUF -> 12 34 56 }T  expected [ 0, 0, 0 ] to deeply equal [ 18, 52, 86 ].
Error: in line: 947 T{ FBUF FBUF CHAR+ 2 CHARS MOVE -> }T  expected [ 172, 173, 2 ] to deeply equal [].
Error: in line: 948 T{ SEEBUF -> 12 12 34 }T  expected [ 0, 0, 0 ] to deeply equal [ 18, 18, 52 ].
Error: in line: 950 T{ FBUF CHAR+ FBUF 2 CHARS MOVE -> }T  expected [ 173, 172, 2 ] to deeply equal [].
Error: in line: 951 T{ SEEBUF -> 12 34 34 }T  expected [ 0, 0, 0 ] to deeply equal [ 18, 52, 52 ].