Quite a wonderful performance.
As to problems with syntax, here a more streamlined version of ALGO1:
Code:
CKSUM: # 85FAh
SIZE: 1673.
« → d p1 p2 p3
« p1 SIZE DUP
ZEROLST OVER 2 / IP
ROT p2 SIZE p3 SIZE
p1 1 GET p2 1 GET
p3 1 GET 0 0 0 → c
m l1 l2 l3 x y z d1
d2 ci
« x y + z + 10
/ IP 'ci' STO c 1
ci PUT 'c' STO d 2
m * 1 - GET 'd1'
STO d 2 m * GET
'd2' STO
IF z d1 <
THEN d2 y -
ELSE d2 y - 1
-
END 10 MOD
'x' STO p1 2 x PUT
l1 1 - x PUT 'p1'
STO d1 z - 1 - 10
MOD 'y' STO p2 2 y
PUT l2 1 - y PUT
'p2' STO d 2 GET x
- y - ci - 10 MOD
'z' STO p3 2 z PUT
l3 1 - z PUT 'p3'
STO x y + z + ci +
d 2 GET - 10 / IP
'ci' STO c 2 ci PUT
'c' STO
IF m 3 >=
THEN 3 m
FOR i d 2 m
* i - 1 + GET 'd1'
STO d i GET 'd2'
STO z d1 < 'x' STO
p1 i x PUT l1 i - 1
+ x PUT 'p1' STO d1
z - 1 - 10 MOD 'y'
STO p2 i y PUT l2 i
- 1 + y PUT 'p2'
STO d2 x - y - ci -
10 MOD 'z' STO p3 i
z PUT l3 i - 1 + z
PUT 'p3' STO x y +
z + ci + d2 - 10 /
IP 'ci' STO c i ci
PUT 'c' STO
NEXT
END p1 m 1 +
0 PUT 'p1' STO
IF c m GET 0
==
THEN p1 m 1 +
1 PUT 'p1' STO
ELSE
IF c m GET
2 ==
THEN
IF p3 m
GET 9 ==
THEN p1 m
1 + 1 PUT 'p1' STO
p2 m GET 1 - 'y'
STO p2 m 1 + y PUT
m y PUT 'p2' STO p3
m 0 PUT 'p3' STO
ELSE p2 m
GET 1 - 'y' STO p2
m 1 + y PUT m y PUT
'p2' STO p3 m GET 1
+ 'z' STO p3 m z
PUT 'p3' STO
END
END
END p1 NL→I
p2 NL→I p3 NL→I
»
»
»