• Convert the following pseudo-code into assembly codo-(/'represents-comments). // Each element is 1 Byte long // Each element is 1 Byte long arrayl 13h, 14h, 15h, 16h array2 12h, 13h, 14h, 15h // lengthl is a Symbolic constant // length2 is a Symbolic constant // this variable is 1 byte long initialized with 30 lengthl = number of items in Arrayl. length2 = number of items in Array2 samplel = 30h sample2 = 5h. // this variable is 1 byte long 1 byte long variable maxlength = max of lengthl and length2. // maxlength is // this is a variable initialized with 0 index = 0. While ( index < maxlength ){ If (arrayl[index] > array2[index] expl = (arrayl[index] * samplel) / (array2[index] Sample2) 7,1, only store the quotient of the division in expl and expl is 16 bít long variable else expl = 0 index = index + 1 }

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
. Convert the following pseudo code into assembly codo- (//' represents-comments).
// Each element is 1 Byte long
// Each element is 1 Byte long
arrayl
13h, 14h, 15h, 16h
array2 12h, 13h, 14h, 15h
// lengthl is a Symbolic constant
// length2 is a Symbolic constant
// this variable is 1 byte long initialized with 30
lengthl = number of items in Arrayl.
length2 = number of items in Array2
samplel = 30h
sample2 = 5h.
// this variable is 1 byte long
1 byte long variable
maxlength = max of lengthl and length2. // maxlength is
// this is a variable initialized with 0
index = 0.
While (
If (arrayl [index] > array2[index]
index < maxlength ){
* samplel) / (array2[index]
expl = (arrayl[index]
only store the quotient of the division in expl and expl is
7/16 bit long variable
Sample2)
else
expl = 0
index = index + 1
}
Transcribed Image Text:. Convert the following pseudo code into assembly codo- (//' represents-comments). // Each element is 1 Byte long // Each element is 1 Byte long arrayl 13h, 14h, 15h, 16h array2 12h, 13h, 14h, 15h // lengthl is a Symbolic constant // length2 is a Symbolic constant // this variable is 1 byte long initialized with 30 lengthl = number of items in Arrayl. length2 = number of items in Array2 samplel = 30h sample2 = 5h. // this variable is 1 byte long 1 byte long variable maxlength = max of lengthl and length2. // maxlength is // this is a variable initialized with 0 index = 0. While ( If (arrayl [index] > array2[index] index < maxlength ){ * samplel) / (array2[index] expl = (arrayl[index] only store the quotient of the division in expl and expl is 7/16 bit long variable Sample2) else expl = 0 index = index + 1 }
array1 elements are 1 byte long
array2 elements are 1 byte long
length1 and length2 are symbolic constant
sample1 and sample2 are 1 byte long variables initialized with 30h, and 5h respectively
maxlength is a 1 byte long variable and uninitialized in the beginning.
Inside the code section, compute the largest between length1 and lenght2 and store it in the
maxlength
Index is a variable that is 1 byte long and initialized with 0
Exp1 is a variable that is 2 byte long.
You are free to use any register and user defined temporary memory variables to store the
values.
Your code must produce correct results.
Also handle corner cases (e.g. if the divisor is zero, assign 0 to exp1)
Transcribed Image Text:array1 elements are 1 byte long array2 elements are 1 byte long length1 and length2 are symbolic constant sample1 and sample2 are 1 byte long variables initialized with 30h, and 5h respectively maxlength is a 1 byte long variable and uninitialized in the beginning. Inside the code section, compute the largest between length1 and lenght2 and store it in the maxlength Index is a variable that is 1 byte long and initialized with 0 Exp1 is a variable that is 2 byte long. You are free to use any register and user defined temporary memory variables to store the values. Your code must produce correct results. Also handle corner cases (e.g. if the divisor is zero, assign 0 to exp1)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 4 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY