BACK TO BASE (1K ZX81)
by David Webber
from ZX Computing (June/July 1984), page 40

This program will convert whole numbers to the corresponding value in a number that has been selected. If the base is less than 10, the numerals are printed consecutively; if greater than 10 then line 50 provides suitable spacing.

Obviously very high and silly inputs will cause much confusion  what do you expect from 1K?