954,490 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

chars and strings

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

asymmetric
Newbie Poster
4 posts since Aug 2008
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You