linux - Why can't I print the user input data in NASM assembly? -
I am trying to verify the length of user input in this example (NASM):
section .bss user_input resb section 10 .text push ebp mov ebp, esp mov eax, 3; Sys_read mov ebx, 0; Stdin mov ecx, user_input mov edx, 10 int 80h cmp eax, 10 jg overflow jmp overflow:. . . Why this work is not being done?
">
Since your buffer is 10 bytes And you put length in ADX, returns can never exceed 10 and you go to label done: and exit. The code you show Nothing is printed in anything that prints.
Comments
Post a Comment