Data Transfer and Addressing Modes

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

Which instruction is designed to transfer bytes or words between registers, memory, and immediate data sources?

  • MOV (correct)
  • IN & OUT
  • POP
  • PUSH

Program control transfer instructions, are instructions for the transfer of data from memory to internal register, from internal register to memory, from one register to another register, from input port to internal register, from internal register to output port, etc.

  • true
  • false (correct)

Which of the following instructions is NOT used to perform rotate operations?

  • ROR
  • ROL
  • RCR
  • REP (correct)

Which of the following is NOT a data copy/transfer function?

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

If CS contains 2001H and IP contains 007CH, what physical memory location is accessed for the next instruction?

<p>2008CH (C)</p> Signup and view all the answers

For the instruction MOV CL, CH, what is the code in the REG field when assembled?

<p>001 (C)</p> Signup and view all the answers

Given CS = 2000H and IP = 1000H, what is the memory address of the next instruction executed by the microprocessor?

<p>21000H (A)</p> Signup and view all the answers

If SI = 1000H, what does MOV [SI], BH do?

<p>Writes byte of data from BH into memory location 1000H (B)</p> Signup and view all the answers

If a descriptor has Base = 23000000H, Limit = 012FFH and G = 1, at what address does the described segment end?

<p>242FFFFFH (A)</p> Signup and view all the answers

If the MOD field contains a 00, 01, or 10 and the R/M Code is 001, what addressing mode is used?

<p>DS:[BX+DI] (C)</p> Signup and view all the answers

If the direction bit, D=1, data flows _____ the register REG field _____ the R/M field located in the second byte of an instruction.

<p>&quot;to, from&quot; (D)</p> Signup and view all the answers

If the instruction is MOV BL,DS:[1234H], what is the code for R/M?

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

In a compare (CMP) operation, where is the result of the comparison stored?

<p>nowhere (C)</p> Signup and view all the answers

In protected mode, a selector value provides segment information EXCEPT:

<p>ending address (B)</p> Signup and view all the answers

In protected mode memory, protection is implemented by restricting access to memory segments through:

<p>both a and b (B)</p> Signup and view all the answers

In protected mode, access to the segment is allowed if:

<p>both a and b (B)</p> Signup and view all the answers

In real mode, what physical address is accessed by the segment-offset combination 0CD1:02E0?

<p>0CFF0H (C)</p> Signup and view all the answers

In the RCL instruction, what operation do the contents of the destination operand undergo?

<p>carry flag is pushed into LSB &amp; MSB is pushed into the carry flag (D)</p> Signup and view all the answers

Which instruction is used to examine the state of individual bits, or groups of bits?

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

Which of the following selects the operation (addition, subtraction, move, etc.) that is performed by the microprocessor?

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

Which flag that acts as the 'Borrow' flag in the SBB instruction?

<p>carry flag (C)</p> Signup and view all the answers

What best describes the instruction MOV DS:[2000H], AL?

<p>copies byte-size data in AX to the memory (C)</p> Signup and view all the answers

If the instruction is MOV AX, [BX], what is this an example of?

<p>register indirect addressing mode (C)</p> Signup and view all the answers

To compare the source and destination operands, what operation does the CMP instruction perform between the operands?

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

"If the instruction is MOV CL,DS:[1234H], the code for mm = ______"

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

"The instruction MOV [BP],DL will assemble with mm/mod="

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

"The instruction is MOV BL,DS:[1234H] will assemble as a _______ instruction."

<p>4 byte (C)</p> Signup and view all the answers

"The instruction, MOV AX, 1234H is an example of"

<p>immediate addressing mode (C)</p> Signup and view all the answers

"The instruction, MOV AX,[BX] is an example of"

<p>register indirect addressing mode (B)</p> Signup and view all the answers

To format your question, type brackets around the answer and separate multiple answers with a semicolon. For example: One of the primary colors is [red; blue; yellow]. You may also use a regular expression. Only one expression per blank will be recognized. For example: [[a-zA-Z]] is any letter in the alphabet. Convert to machine code the instruction ADC BX,DX. (Answer in Hexadecimal)

<p>13DA</p> Signup and view all the answers

Convert to machine code the instruction AND AL,0FCH. (Answer in Hexadecimal) [Blank 1]

<p>24FC</p> Signup and view all the answers

Convert to machine code the instruction, POP BP. (Answer in Hexadecimal) [Blank 1]

<p>5D</p> Signup and view all the answers

Covert the machine code 8CD0H to Assembly Language. [Blank 1]

<p>MOVAX, SS</p> Signup and view all the answers

GIven: MOV BL,04Fh ADDBL, 0B1H The execution part results in ZF=0. True or False

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

Given the following , what is the content of the destination after executing the instructions MOVAX, 0FEEDh ANDAX, 0F00Dh

<p>AX =F00Dh (C)</p> Signup and view all the answers

Given the following what is the content of the register after executing the instruction MOVAX, 11001100b XORAX, 0CH

<p>AX =000Ch (A)</p> Signup and view all the answers

In calculating the target address to jump to, a displacement is added to the contents of the register ___. [Blank 1]

<p>IP</p> Signup and view all the answers

In unsigned division of a doubleword in DX AX by a word in CX, the quotient will be placed in [Blank 1] and the remainder in [Blank 2]

<p>AX DX</p> Signup and view all the answers

In unsigned division of a word in AX by a byte in DATA2, the quotient will be placed in [Blank 1] and the remainder [Blank 2]

<p>AL AH</p> Signup and view all the answers

In unsigned multiplication of AX with BX, the product will be bplaced in register(s) [Blank 1]

<p>DX;AX</p> Signup and view all the answers

In unsigned multiplication of CX with a byte in AL, the product is placed in both AX and DX registers.

  1. True
  2. False

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

The 100010dw mmregr/m template should be used for converting the following assembly instructions to machine code except:

<p>&quot;MOV ES, AX&quot; (B)</p> Signup and view all the answers

The instruction that performs logical AND operation and the result of the operation is not stored in the destination operand.

<p>TEST (C)</p> Signup and view all the answers

This instructions inverts the carry flag.

<p>CMC (C)</p> Signup and view all the answers

This group of instruction is used to shift or rotate bits left or right in register or memory operands.

<p>Bit Manipulation Instructions (A)</p> Signup and view all the answers

Flashcards

MOV Instruction

It is a general purpose instruction to transfer byte or word from register to register, memory to register, register to memory or with immediate addressing.

Program Control Transfer Instructions

Instructions for the transfer of data from memory to internal register, from internal register to memory, from one register to another register, from input port to internal register, from internal register to output port, etc.

Assembler

This is a utility program that converts source code programs from assembly language into machine language.

2008CH

The physical memory location accessed for the next instruction, given CS=2001H and IP=007CH.

Signup and view all the flashcards

001

The code in the REG field when assembled, for the instruction MOV CL, CH.

Signup and view all the flashcards

21000H

The memory address of the next instruction executed by the microprocessor, given CS = 2000H and IP= 1000H.

Signup and view all the flashcards

242FFFFFH

The segment ends at this address if a descriptor has Base = 23000000H, Limit = 012FFH and G =1.

Signup and view all the flashcards

to, from

Data flow in the register REG field to the R/M field located in the second byte of an instruction, when the direction bit, D=1.

Signup and view all the flashcards

110

The code for R/M, if the instruction is MOV BL,DS:[1234H].

Signup and view all the flashcards

00

The code for mm if the instruction is MOV CL,DS:[1234H].

Signup and view all the flashcards

ending address

The selector value gives all segment information except this in protected mode.

Signup and view all the flashcards

both a and b

In protected mode memory, protection is implemented by restricting access to memory segments through these.

Signup and view all the flashcards

both a and b

In protected mode, access to the segment is allowed if which is true.

Signup and view all the flashcards

Carry Flag

This flag acts as the Borrow flag in the instruction SBB.

Signup and view all the flashcards

copies byte-size data in AX to the memory

The instruction MOV DS:[2000H], AL copies byte-size data in AX to the memory.

Signup and view all the flashcards

01

The instruction MOV [BP], DL will assemble with mm/mod= 01.

Signup and view all the flashcards

4-byte

The instruction is MOV BL,DS:[1234H] will assemble as a 4-byte instruction.

Signup and view all the flashcards

Subtraction

To compare the source and destination operands, CMP instruction performs subtraction between the operands.

Signup and view all the flashcards

"10000H, 1FFFFH"

Address of the segment located by the segment register value, 1000H.

Signup and view all the flashcards

a, c and d

These segment:offset combinations points to a common physical memory address: a) A1B2:000C, b) A1B0:200C, c) A1B0:002C, d) A1B1:001C

Signup and view all the flashcards

IP

In calculating the target address to jump to, a displacement is added to the contents of the register IP.

Signup and view all the flashcards

AH

In unsigned division of AX by a byte in DATA2, the quotient will be placed in AL and the remainder AH

Signup and view all the flashcards

TEST

The instruction that performs logical AND operation and the result of the operation is not stored in the destination operand TEST.

Signup and view all the flashcards

Bit Manipulation Instructions

This group of instruction is used to shift or rotate bits left or right in register or memory operands Bit Manipulation Instructions.

Signup and view all the flashcards

MOV instruction

Instruction to transfer byte or word from register to register, memory to register, register to memory or with immediate addressing.

Signup and view all the flashcards

Study Notes

Instructions and Data Transfer

  • A general-purpose instruction transfers a byte or word from register to register, memory to register, register to memory, or with immediate addressing.
  • MOV instruction performs tasks such as moving data between registers, moving data between memory and registers, and utilizing immediate addressing.
  • Program control transfer instructions facilitate data transfer: from memory to internal register, from internal register to memory, from one register to another, from an input port to internal register, and from internal register to an output port.
  • Instructions, except REP, are used to perform rotate operations.
  • DAS is not a data copy/transfer function.
  • The instruction MOV DS:[2000H], AL copies byte-size data in AX to the memory.

Addressing and Memory

  • If CS contains 2001H and IP contains 007CH, the physical memory location accessed for the next instruction is 2008CH.
  • Given CS = 2000H and IP = 1000H, the memory address of the next instruction executed by the microprocessor is 21000H.
  • If a descriptor has Base = 23000000H, Limit = 012FFH, and G = 1, the described segment ends at 242FFFFFH.
  • If the MOD field contains 00, 01, or 10 and the R/M Code is 001, the addressing mode is DS:[BX+DI].
  • The starting and ending address of the segment located by the segment register value 1000H : "10000H,1FFFFH".
  • The segment-offset combinations that point to a common physical memory address are a) A1B2:000C and c) A1B0:002C.
  • In real mode, the physical address accessed by the segment-offset combination 0CD1:02E0 is 0CF0H.
  • In calculating the target address to jump to, a displacement is added to the contents of the IP register.
  • The instruction MOV AX, 1234H is an example of immediate addressing mode.
  • The instruction MOV AX,[BX] exemplifies register indirect addressing mode.

Assembly Instructions and Machine Code

  • An assembler is a utility program for converting source code programs from assembly language into machine language.
  • For the instruction MOV CL, CH, the code in the REG field when assembled is 001.
  • If the direction bit D=1, data flow: to, from. The register REG field the R/M field is located in the second byte of an instruction.
  • If the instruction is MOV BL,DS:[1234H], the code for R/M is 110.
  • If the instruction is MOV CL,DS:[1234H], the code for mm is 00.
  • The instruction MOV [BP], DL will assemble with mm/mod=01.
  • The instruction MOV BL,DS:[1234H] will assemble as a 4-byte instruction.
  • The machine code for the instruction ADC BX,DX is 13DA in hexadecimal.
  • The machine code for the instruction AND AL,0FCH is 24FC in hexadecimal.
  • The machine code for the instruction POP BP is 5D in hexadecimal.
  • The assembly language equivalent of the machine code 8CD0H is MOVAX,SS.
  • The 100010dw mmregr/m template is used for converting assembly instructions to machine code, with the exception of "MOV ES, AX".
  • With MOV BL,04Fh and ADDBL, 0B1H, the execution part results in ZF=0 is considered false.

Protected Mode

  • A selector value in protected mode provides segment information, except for the ending address.
  • Memory protection in protected mode is implemented by restricting access to memory segments through privilege levels and access rights.
  • In protected mode, access to the segment is allowed if both RPL = DPL and RPL > DPL.
  • 32-bit microprocessors operating in protected mode can address up to 4GB of memory.
  • The 80286 could be operated in protected mode, but with only a 24-bit address bus.
  • You must never use the segment registers as data registers to hold arbitrary values because: They should only contain segment addresses

Instruction Execution and Flags

  • The instruction that performs logical AND operation and the result of the operation is not stored in the destination operand: TEST.
  • Opcode selects the operation (addition, subtraction, move, and so on) that is performed by the microprocessor.
  • The carry flag acts as the Borrow flag in the instruction SBB.
  • CMC inverts the carry flag.
  • A MOV [SI], BH instruction writes a byte of data from BH into memory location 1000H assuming SI = 1000H.
  • In a compare (CMP) operation, the result of the comparison is not stored anywhere.
  • The instruction that performs logical AND operation and the result of the operation is not stored in the destination operand is TEST.
  • Given the following, what is the content of the destination after executing the instructions MOVAX, OFEEDH and ANDAX, 0F00Dh is AX =F00Dh.
  • Given the following what is the content of the register after executing the instruction MOVAX, 11001100b XORAX, OCH is AX=000Ch.
  • In unsigned division of a doubleword in DX AX by a word in CX, the quotient will be placed in AX and the remainder in DX.
  • In unsigned division of a word in AX by a byte in DATA2, the quotient will be placed in AL and the remainder in AH.
  • In unsigned multiplication of AX with BX, the product will be placed in registers DX;AX.

Bit Manipulation

  • Bit Manipulation Instructions is used to shift or rotate bits left or right in register or memory operands.
  • It is used to examine the state of individual bits, or groups of bits iand the instruction is Test.
  • In the RCL instruction, the carry flag is pushed into LSB & MSB is pushed into the carry flag.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Data Transfer
7 questions

Data Transfer

TrustedIndicolite avatar
TrustedIndicolite
Assembly Language Instructions
39 questions

Assembly Language Instructions

RevolutionaryDifferential avatar
RevolutionaryDifferential
Use Quizgecko on...
Browser
Browser