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

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -