Question
Assembly Language for x86 Processors project:In this project, write a PROC named STRLEN (STRing LENgth) that accepts one argument - the address of the string
Assembly Language for x86 Processors project:In this project, write a PROC named STRLEN (STRing LENgth) that accepts one argument - the address of the string whose length will be computed and return the computed length. To test the program, query the user to enter a string using the STRQRY proc developed in Project 3 and pass the value returned to the STRLEN proc. Display the result along with an appropriate message at the end of the program.
TITLE Project 3 (NameUser.asm)
;AUTHOR
;DATA: 10/09/2017
INCLUDE IRVINE32.INC
.data
Prompt BYTE "Please enter your name",0
Messege BYTE "You entered ",0
firstName BYTE 50 DUP(0),0
.code
main PROC
mov edx, OFFSET Prompt
push edx
call STRQRY; length should be at edx
mov ebx, eax
mov edx,OFFSET messege
call writestring
mov edx,ebx
call writestring
EXIT
main ENDP
STRQRY PROC
push ebp
mov ebp, esp
mov edx, [esp + 8]; get the start address of the string
mov eax,0
call writestring
mov edx, offset firstname
pop ebp
ret
END MAIN
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started