Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- section .text
- global _start
- _start:
- ;get input
- sub esp,2
- push name1
- call getString
- pop word[length1]
- sub esp,2
- push name2
- call getString
- pop word[length2]
- terminate:
- mov eax,4
- mov ebx,1
- mov ecx,lowername1
- mov edx,[length1]
- int 80h
- mov eax,1
- mov ebx,0
- int 80h
- getString:
- mov ebp,esp ;ebp+4=&name
- ;ebp+8=length
- mov eax,4
- mov ebx,1
- mov ecx,enterName
- mov edx,enterNameLen
- int 80h
- mov eax,3
- mov ebx,0
- mov ecx,[ebp+4]
- mov edx,21
- int 80h
- ;ecx = length
- dec al ;remove the n character
- ;byte[ecx]=length
- mov [ebp+8],al
- ret 4
Add Comment
Please, Sign In to add comment