Y86 Data Movement Instructions Quiz
20 Questions
2 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What does an immediate operand represent in Y86?

  • An undefined value
  • A register value
  • A constant value (correct)
  • A memory address

In Y86, which type of instruction affects both read and write operations on the destination operand?

  • Data movement instructions
  • Memory instructions
  • ALU instructions (correct)
  • Control instructions

What kind of operands do all 4 ALU instructions in Y86 use?

  • Two register operands (correct)
  • Three register operands
  • Immediate operands
  • Memory operands

Which type of Y86 instructions set the 3 flags used in the architecture?

<p>ALU instructions (B)</p> Signup and view all the answers

How are address expressions for memory operands structured in Y86?

<p>(BASE + DISP) (C)</p> Signup and view all the answers

What happens to the flags when non-ALU instructions are executed in Y86?

<p>They remain unaffected (D)</p> Signup and view all the answers

Which type of jump instruction is unconditional in Y86?

<p>jmp (D)</p> Signup and view all the answers

What must be the condition of flags for a 'je' instruction to take the jump in Y86?

<p>'ZF = 1' (B)</p> Signup and view all the answers

'jg' instruction in Y86 stands for:

<p>'Jump greater' (C)</p> Signup and view all the answers

'rrmovq' instruction in Y86 is used for:

<p>'Register-register move' (D)</p> Signup and view all the answers

What happens when a jump (or branch) is not taken in Y86?

<p>The next instruction executed will be the one immediately after the jump instruction (B)</p> Signup and view all the answers

How does the stack grow in memory when new data is pushed onto it in Y86?

<p>It grows downward; towards lower addresses (B)</p> Signup and view all the answers

What is the purpose of saving the calling subroutine's rbp before setting its own base/frame pointer?

<p>To allow for restoration of the calling subroutine's base/frame pointer (D)</p> Signup and view all the answers

In Y86, how are parameters passed on the stack?

<p>They are pushed onto the stack in reverse order (C)</p> Signup and view all the answers

What does each subroutine in Y86 receive to use as a portion of the stack?

<p>A frame (B)</p> Signup and view all the answers

What is always pushed onto the stack after all parameters when calling a subroutine?

<p>The return address (D)</p> Signup and view all the answers

What do labels represent in Y86?

<p>Strings that mark addresses in memory (C)</p> Signup and view all the answers

What are two things that the call instruction in Y86 accomplishes?

<p>Pushes parameters onto the stack and jumps to a target location (D)</p> Signup and view all the answers

What do the pushq and popq instructions do in Y86?

<p>Push data onto and pop data off the stack, respectively (C)</p> Signup and view all the answers

What two things does the ret instruction do in Y86?

<p>Restores the caller's base pointer and returns control to caller (D)</p> Signup and view all the answers
Use Quizgecko on...
Browser
Browser