flat assembler
Message board for the users of flat assembler.
Index
> Linux > [Question] CRLF in read line |
Author |
|
vid 24 Aug 2008, 22:12
In linux, it is just 0xA, no 0xD. You can either add it to end of buffer (careful with overflows), or print string and then print the 0xA character.
|
|||
24 Aug 2008, 22:12 |
|
Endre 28 Aug 2008, 14:32
vid is right. syscall "read" returns character count read in eax. So you might have to add something like this:
Code: mov word [str + eax], 0x000d 0x0d for new line and 0x00 for string end (note byte order!) of course you have to ensure that you don't over-index str. For instance you may set edx to max_str_length - 2 before invoking "read". |
|||
28 Aug 2008, 14:32 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.