Task

Explicitly implement   long multiplication.

This is one possible approach to arbitrary-precision integer algebra.



For output, display the result of    264 * 264.

Optionally, verify your result against builtin arbitrary precision support.

The decimal representation of    264    is:

18,446,744,073,709,551,616

The output of    264 * 264    is    2128,    and is:

340,282,366,920,938,463,463,374,607,431,768,211,456



BOL
#11 = EOL_Pos-Cur_Pos
#12 = EOL_Pos-1
Line(1)
#21 = EOL_Pos-Cur_Pos
#22 = EOL_Pos-1
EOL Ins_Newline
Ins_Char('0', COUNT, #11+#21)
#32 = Cur_Pos-1
 
for (#2 = 0; #2 < #21; #2++) {
    Goto_Pos(#22-#2) #5 = Cur_Char - '0'
    for (#1 = 0; #1 < #11; #1++) {
        Goto_Pos(#12-#1) #6 = Cur_Char - '0'
	#7 = #5 * #6
	#3 = #1 + #2
	while (#7 > 0) {
	    Goto_Pos(#32-#3)
	    #7 += Cur_Char - '0'
	    Ins_Char(#7%10 + '0', OVERWRITE)
	    #3++
	    #7 = #7/10 
        }
    }
} 