Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using Linux Terminal cmd 1. Register addressing Write a program register.asm that adds register AH to register AL, only use the values that are currently

using Linux Terminal cmd

1. Register addressing Write a program register.asm that adds register AH to register AL, only use the values that are currently in these registers. 2. Immediate Addressing Write a program immediate.asm that adds the number 5 to a constant called first1. Note that this arithmetic must take place in a register. 3. Direct Addressing Write a program direct.asm that subtracts var2 from var1, then places the result in answer. Declare all three variables in the data segment as words. Inititalize var1 as 3231H and var2 as 2217H. 4. Register Indirect Addressing Declare an array that contains the numbers: 1,2,3,4 (byte size). Use BX to point to the first array element initially. Subtract the second array element from the first, and store the result in the fourth element. Use the INC and DEC commands to change the array element that is pointed to. 5. Indexed Relative Addressing Repeat the previous problem, but use SI to point to the first array element. Use indexed addressing with a displacement value to access other array elements. E.g. do not change the contents of the SI register. 6. Based Relative Addressing Copy the top 2 words from the stack into registers AX and CX respectively. Do this without changing the stack pointer do not use POP instructions! Use BP as the base register. How will your program know what value to place in BP? To ensure that the stack contains some known values, place the following code at the beginning of your program: mov dx, 1234H push dx mov dx, 0ABCDH push dx

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

Power Bi And Azure Integrating Cloud Analytics For Scalable Solutions

Authors: Kiet Huynh

1st Edition

B0CMHKB85L, 979-8868959943

More Books

Students also viewed these Databases questions

Question

Consider the signal x(n) = anu(n), |a| Answered: 1 week ago

Answered: 1 week ago

Question

a. What is the probability that the concentration exceeds .25?

Answered: 1 week ago