Meant to multiply two whole numbers of any length exactly, digit by digit, instead of to the ZX81’s 8-digit accuracy: type the two numbers as strings and the product is printed one digit per line.
As printed, the listing has errors in lines 70, 90 and 110 (line 70 repeats FOR M, line 90 reads LET B + JAL X$(M)), so it does not run.
Published in Sinc-Link September-October 1990 (Multiplication Accuracy with the ZX81).
Source Code
30 INPUT X$
40 INPUT Y$
50 DIM A( LEN X$ + LEN Y$)
60 FOR M = LEN X$ TO 1 STEP-1
70 FOR M = LEN Y$ TO 1 STEP -1
80 LET C = M + N
90 LET B + JAL X$(M)
100 LET A(C) = VAL Y$(N) * B + A(C)
110 LET I = INT A(C) - (I * 10)
120 LET A(C) = A(C) - (I * 10)
130 LET A(C-1) = A(C-1) + I
140 NEXT N
150 NEXT M
160 CLS
170 PRINT X$; "X"; Y$; " = ";
180 PRINT
190 FOR P = 2 TO (LEN X$ + LEN Y$)
200 PRINT A(P)
210 NEXT P
220 STOPNote: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.

