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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!