Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assembly Programming Question: Add code so that the program additionally prints out sum of elements in the two vectors. The printout should be like this:

Assembly Programming Question:

Add code so that the program additionally prints out sum of elements in the two vectors.

The printout should be like this:

The in product is 62!

The sum is 40!

image text in transcribedimage text in transcribed

! This program multiplies two vectors It shows a subroutine with arguments and ! a local variable. See section 9.8.3 EXIT = 1 PRINTF = 127 SECT . TEXT inpstart: MOV BP, SP PUSH vec2 PUSH vecl MOV CX, vec2-vecl !8 SHR CX,1 PUSH CX CALL vecmul MOV (inprod),AX 12 PUSH AX PUSH pfmt PUSH PRINTF SYS ADD SP, 12 PUSH0 PUSH EXIT SYS ! 20 vecmul: ! 22 ! 23 PUSH BP MOV BP, SP MOV CX, 4 (BP) MOV SI, 6 (BP) MOV DI, 8 (BP) PUSH0 ! 25 ! 26 ! 27

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

Joe Celkos Data And Databases Concepts In Practice

Authors: Joe Celko

1st Edition

1558604324, 978-1558604322

More Books

Students also viewed these Databases questions

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago