Well... print a number, print a comma (and perhaps a space), print the next number... until done.
All those calls to the OS are kinda crap. Better to write the whole thing to a buffer and print it all at once.
At 10 potential digits per number, plus the comma (and space), this could exceed the width of your screen. You might want to implement "word wrap"...
Have you got a routine to convert *one* number to text, or is that what you need?
Best,
Frank