Question

In: Computer Science

Give six examples of memory addressing commands in Intel assembly language two of each(register-memory, register offset...

Give six examples of memory addressing commands in Intel assembly language two of each(register-memory, register offset with an index, and perhaps one other) and explain what they are doing. Why is there no Assembly command to move an item from one RAM location to another directly?

Solutions

Expert Solution

Below are the addressing modes used in intel 8086 assembly language.

-Immediate addressing mode in which data operand is a part the instruction.

Example:

mov ax, 0954h ; immediate value is moved to register ax.

add cx, 5567h; the data in cx is added to the immediate data.

-Register addressing mode in which operands are registers.

Example:

mov cx, dx; data in register dx is moved to register cx.

add ax,bx; data in registers ax and bx are added.

-Direct addressing or register memory addressing in which specific memory address is directly written in the instruction. operand data is stored in the specified address.

Example;

mov ax,[3456h] ; the data in the given address is directly moves to ax.

add, [de45h],bx ; data in register bx is added to the data in memory location de45h.

Register indirect addressing in which operand registers contains the address of the data. Addresses are stores in bp, bx or index registers such as si and di. These registers contains data segment offset address.

Example:

mov ax,[bx]; suppose register bx has value 3462h, then the data in memory location 3462h will be moved to register ax.

mov [si], bx; data segment offset address is stored in si, suppose si=0220h and data segment ds=0aabh, then memory address is calculated as

Data segment value (left shifted)+ si value =0220+0aa0*10=0cd0h so the instruction moves data in register bx to the memory location.

-​​​​​​-Register offset with index( base/indexe addressing addressing)

In this addressing mode, a displacement value is to be added with base/ index register value to get the memory address.

Example;

mov dx,[bx+04]; displacement value 04 is added to the value in base register bx to get the memory address. Then the data in that memory location is moved to register dx.(base addressing)

mov cx, [si+16] ; the displacement value 16 is added to the data segment offset address stored in the index register si to get the memory location of the data. Then that data is added to the data in register cx.(indexed added).

add cx, [ax+si]; data segment offset value is in the index register si. It is added to the register value to get the memory address of the data.(based index address)

add dx,[bx+si+04]; in this, memory address of the data is calculated by adding register value, index register value and the offset value.

Memory to memory mode is not possible in assembly language because RAM memory can only be in one of the two states. read mode or write mode. So to move data from one location of RAM to another, it need switching from read mode to write mode. So a temporary storage is needed to store the data.

But it is possible to move data from RAM to RAM using some high level instruction in microcode that would translate RAM to Register, then from Register to RAM. With recent advancement RAM to RAM data transfer is possible with some support logic, not RAM itself.


Related Solutions

Write an Intel 8085 assembly program to find the largest of N numbers stored in memory...
Write an Intel 8085 assembly program to find the largest of N numbers stored in memory using the algorithm below. Hand trace (execute) the program showing the changes made to all affected registers and memory locations. Max = a(1) For i = n to N If max < a(i) then max = a(i) Next i
For the PIC16F887, using the execution delay of instructions, write assembly language commands to implement a...
For the PIC16F887, using the execution delay of instructions, write assembly language commands to implement a delay of 3 seconds
The Indexed addressing mode can not be used to specify the destination in MSP430 assembly language...
The Indexed addressing mode can not be used to specify the destination in MSP430 assembly language programs. Select one: True False
What is an endocrine disrupter? Give six examples. Pick two of the examples and describe the...
What is an endocrine disrupter? Give six examples. Pick two of the examples and describe the birth defects associated with the them, what is the molecular mechanism? What steps should pregnant women take to avoid the effects?
What is an endocrine disrupter? Give six examples. Pick two of the examples and describe the...
What is an endocrine disrupter? Give six examples. Pick two of the examples and describe the birth defects associated with the them, what is the molecular mechanism? What steps should pregnant women take to avoid the effects?
Write an assembly language program that prints your first name in the output. Use immediate addressing...
Write an assembly language program that prints your first name in the output. Use immediate addressing with a hexadecimal constant to designate the operand of CHARO for each letter of your name. Comment each line except STOP and END. Cut and paste the Assembler Listing into your document and paste a screen shot of the Output area of the Pep8. Use the name "Kevin" as example Assembler Listing Screen Shot of Output area of the Pep8 program
Write an assembly language program for 8085 microprocessor to read consecutive memory locations from 2000 to...
Write an assembly language program for 8085 microprocessor to read consecutive memory locations from 2000 to 2FFF & transfer to 4000 to 4FFF
HCS12 Assembly Language: 1. Write a program to convert a decimal number stored at memory location...
HCS12 Assembly Language: 1. Write a program to convert a decimal number stored at memory location $1010 into a binary number. Store the result in memory location $2000
Identify six classes of physical controls employed in the expenditure cycle and give examples of each.
Identify six classes of physical controls employed in the expenditure cycle and give examples of each.
a) Give 5 good examples of Regular language. b) Give 5 good examples of Regular Grammar.
a) Give 5 good examples of Regular language. b) Give 5 good examples of Regular Grammar.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT