Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using any of the assembly language instructions shown in Figure 6.5, translate the following algorithmic operations into assembly language code. Show all necessary .DATA pseudo-ops.

Using any of the assembly language instructions shown in Figure 6.5, translate the following algorithmic operations into assembly language code. Show all necessary .DATA pseudo-ops. You may put in whatever initial values you want for a, b, c, and n.

A) Set a to the value of (c + 1) (b c)

B) if b

C) Set c to the value of 0 for a = 1 to n do if a

image text in transcribed

FIGURE 6.5 Binary Op CodeOperation Meaning CON(X) R R-CON(X) 0-CON(X) 0001 0010 0011 0100 0101 0110 0111 LOADX STORE X CLEARX ADD X INCREMENT X SUBTRACTX DECREMENT X COMPAREX CON(X) + 1 CON(X) R-CON(X) R if CONX)>R then GT-1 ese0 ifCOn(X) = R then EQ 1 else 0 1000 1001 1010 1011 1100 1101 JUMP X JUMPGT X JUMPEQX JUMPLT X JUMPNEQX Get the next instruction from memory ocationX Get the next instruction from memory location X if G-1 Get the next instruction from memory location X if EQ 1 Get the next instruction from memory location X if LT 1 Get the next instruction from memory location X if EQ 0 Input an integervalue from the standard input device and store into memory cell X Output, in decimal notation, the value stored in memory cell X Stop program execution. INX 1110 OUT X

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

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions