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

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -