Question

Is this like using pointer dereferencing? (%rax) In X86 is it possible to move data from...

  1. Is this like using pointer dereferencing? (%rax)
  2. In X86 is it possible to move data from one memory address to another in one assembly language instruction?
0 0
Add a comment Improve this question Transcribed image text
Answer #1

In X86 assembly programming language, you ideally can't move data from one memory location to another.

For that matter, you may need a use of registers.

In a way, it is similar to the pointer dereferencing you are asking about. Because it requires PUSHing into registers.

You can use stack push / pop operations directly to this, but it will additionally require memory accesses.

So direct memory to memory movement is not possible in X86, you will need help of registers to do that.

Add a comment
Know the answer?
Add Answer to:
Is this like using pointer dereferencing? (%rax) In X86 is it possible to move data from...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • True or false Assembly x86 41. _____ The program counter is a pointer to the instruction....

    True or false Assembly x86 41. _____ The program counter is a pointer to the instruction. 42. _____ Program labels aren’t necessary to assembled code because the offsets are part of the instruction, 43. _____ Re-entrant code is code that more than one task uses. 44. _____ A diamond-shaped area in a flowchart means it is a decision point. 45. _____ If using AND or OR, for example, the two operands must be the same size. 46. _____ Each assembly...

  • We are using the Kip Irvine Assembly Language for x86 Processors. The programming language is Assembly,...

    We are using the Kip Irvine Assembly Language for x86 Processors. The programming language is Assembly, and we are using visual studio community. Please specify any questions. Directions Declare an array of 60 uninitialized unsigned doubleword values. Create another array of 60 unsigned doublewords, initialized to ‘abcd’. Look at these arrays in the memory window and note how they are stored. (Intel architecture uses little - endian order) ATTEMPT ONLY IF YOU KNOW OTHERWISE I WILL DOWNVOTE.

  • Question 2 Assume that we are using the x86-64 architecture, as mentioned in lecture 4. 2(a)...

    Question 2 Assume that we are using the x86-64 architecture, as mentioned in lecture 4. 2(a) Explain the meaning of the following instruction: movq %rbx, (%rcx)         State your assumptions of the content in registers and memory, before executing this instruction.         What will happen after executing this instruction? (b)Convert the following code fragment (in the C language) to assembly code. Explain your steps. [25 marks] long test ( long a, long b, long c ) { long t; if...

  • Assume that we are using the x86-64 architecture, as mentioned in lecture 4. 2(a)  Explain the meaning...

    Assume that we are using the x86-64 architecture, as mentioned in lecture 4. 2(a)  Explain the meaning of the following instruction:                movq %rbx, (%rcx)         State your assumptions of the content in registers and memory, before executing this instruction.         What will happen after executing this instruction? Answer: [ Write answer here ] 2(b)        Convert the following code fragment (in the C language) to assembly code. Explain steps.                                                                     [25 marks]    long test ( long a, long b, long c ) {        long t; if (a>b)...

  • True or False questions Assembly x86 C++ 35. _____ JMP is a conditional transfer operation. 36....

    True or False questions Assembly x86 C++ 35. _____ JMP is a conditional transfer operation. 36. _____ Before you use the LOOP instruction, you must be aware of how it uses the counter. 37. _____ The LOOP instruction first checks to see whether ECX is not equal to zero; then LOOP decrements ECX and jumps to the destination label. 38. _____ Stacks are LIFO structures, ie, (last-in ,first-out). 39. _____ Instructions that involve only registers work faster because of pre-fetch...

  • computer organization Write this code using x86 assembly language using the irvine32 library 10) In write a procedure that swaps to different values (Do NOT use the XCHG instruction). (7pts )...

    computer organization Write this code using x86 assembly language using the irvine32 library 10) In write a procedure that swaps to different values (Do NOT use the XCHG instruction). (7pts ) 10) In write a procedure that swaps to different values (Do NOT use the XCHG instruction). (7pts )

  • MASM Assembly Language for x86 Processors: Given the following array declaration: .data matrix DWORD 50 DUP(10...

    MASM Assembly Language for x86 Processors: Given the following array declaration: .data matrix DWORD 50 DUP(10 DUP(?)) If matrix[0][0] is the 0th sequentially stored BYTE in memory, which sequentially stored BYTE is the first byte corresponding to matrix[14][2]? (in decimal) Please expplain how you got the answer, so I can answer other questions like this! Thank you

  • Write this code using x86 assembly language using the irvine32 library

    Write this code using x86 assembly language using the irvine32 library Create a procedure that fills an array of doublewords with N random integers, making sure the values fall within the range j...k, inclusive. When calling the procedure, pass a pointer to the array that will hold the data, pass N, and pass the values of j and k. Preserve all register values between calls to the procedure. Write a test program that calls the procedure twice, using different values...

  • Write an Assembly program that will multiply two arrays (index by index) and store the result...

    Write an Assembly program that will multiply two arrays (index by index) and store the result in a third array. Declare an array: .data Arr1: .quad 10 #index 0 .quad 4 #index 1 Arr2: .quad 2,5,6.... Arr3: .quad 0,0,0.... To load array pointer address: Movq $Arr1, %rdx #stores address of Arr1 index 0 in rdx To move to the next index of an array: Adda $8,%rdx To retrieve data: Movg (%rdx), %rcx #will have data at address in rdx We...

  • MASM (Assembly programming) This question is not from a textbook, but the textbook used during course:...

    MASM (Assembly programming) This question is not from a textbook, but the textbook used during course: Assembly Language for x86 Processors, 6th Edition, by Irvine -- Question: Assuming the data segment starts at address 00000000h, Fill in the memory map (table below) for the following data definitions: .data ArrayW Word 1ACDh, -4, 'D' ArrayB BYTE '543', 2Bh, -14, 'Z' ArrayD DWORD -5, '5' --------0------- --------1------- --------2------- --------3------- ---0000--- ---0004--- ---0008--- ---000C--- ---0010--- ---0014--- ---0018---

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT