Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts Of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

4th Edition

0619064625, 978-0619064624

More Books

Students also viewed these Databases questions

Question

What is job enlargement ?

Answered: 1 week ago

Question

what is the most common cause of preterm birth in twin pregnancies?

Answered: 1 week ago

Question

Which diagnostic test is most commonly used to confirm PROM?

Answered: 1 week ago

Question

What is the hallmark clinical feature of a molar pregnancy?

Answered: 1 week ago