NASM - The Netwide Assembler

NASM Forum => Using NASM => Topic started by: nobody on November 21, 2007, 04:24:58 AM

Title: Plz help in printing a vector
Post by: nobody on November 21, 2007, 04:24:58 AM
hi,
i want to know how to print a vector of 10 nbs(ie : Vec dd 10,20,21,...) as a string line with commas between every number.
i really need and appreciate ur help
thx
Title: Re: Plz help in printing a vector
Post by: Frank Kotler on November 21, 2007, 07:42:56 AM
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