asymmetric 0 Newbie Poster

hi!

in my 8088 asm program i'm reading some text from stdin thru the GETCHAR syscall (117), and then i have to write that text into a file, using WRITE (4)

it seems to me as there are two approaches:
the first is to format the chars as a string using SSCANF (125) (with %s as a format).
the second is to just write them as characters, paying attention to the \n at the end.

i think the 2nd approach is more efficient, because it doesn't involve syscalls.

are there any drawbacks to printing chars instead of strings?

thanks
asymmetric

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.