PART B-3 - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

PART B-3

Description:

MOV Transfers data referenced by address of the second operand to the address of the first operand General format [Label ... – PowerPoint PPT presentation

Number of Views:34
Avg rating:3.0/5.0
Slides: 16
Provided by: zn58
Category:
Tags: part | addressing

less

Transcript and Presenter's Notes

Title: PART B-3


1
PART B-3
Symbolic Instructions and Addressing
???????
2
??instruction Sentence (????)  
????????? 1. Data Transfer (????)
MOV?PUSH?POP 2. Arithmetic Operations
(????) ADD?SUB?INC 3. Logical
Operations (????) OR?AND?NOT 4. String
Operation (????) MOVS?LODS(???) 5.
Transfer (????) JMP?CALL?RET 6. CPU
Control (????) CLC(???)?CLI(???)  
3
?????????   1. ??????
OPR DEST 2. ?????? OPR DEST, SRC
3. ?????? OPR
4
??Operands Addressing(???????)
How to lookup the Operands. Assembler
Format ?? ???
?? ?
?? Identifier Operation
Source,Object Comment

Operands 1. Immediate Addressing (????)
Operand in the instruction. For Example
MOV AX, 14 14 AX MOV
SUM, 13 2. Register Addressing (?????)
Operand in some registers. For Example
MOV AH, BL BL AH
5
  3. Direct Addressing (????)
Operand address in the instruction. For
Example MOV AX, 2000H DS2000H
AX
6
4. Register Indirect Addressing(????)
Operand address in some registers. For
Example MOV AX, BX DSBX
AX MOV AX, BP SSBP
AX   5. Indexed Addressing(????) For
Example 1 MOV AX, BXSI
DS(BXSI) AX MOV AX,
BPSI SS(BPSI) AX


?8-5?
7
For Example 2 MY_2 DW 100
DUP(?) ... MOV AX, MY_2BX
DS(MY_2BX) AX For Example 3
MY_3 DW 100 DUP(?) ...
MOV AX, MY_3BXSI DS(MY_3BXSI)
AX MOV AX, MY_3BPSI
SS(MY_3BPSI) AX ?? ???????????
MY_3BXSI BXSIMY_3
BXSIMY_3 BXSIMY_3


?8-6?
8
??????
  • MOV
  • Transfers data referenced by address of the
    second operand to the address of the first
    operand
  • General format
  • Label MOV register/memory,register/memory/i
    mmediate
  • Invalid MOV operations
  • Memory to memory
  • Immediate to segment register
  • Segment register to segment register
  • The operands must agree in size

The only instructions that allow both operands to
address memory directly are MOVS and CMPS
9
  • XCHG
  • Swaps data items
  • General format
  • Label XCHG register/memory,register/memory
  • Example
  • Wordq dw ?
  • XCHG CL, BH
  • XCHG CX, WORDQ

10
  • LEA
  • Initialize a register with an offset address
  • General format
  • Label lea register, memory
  • Example
  • Databl db 25 dup(?)
  • Bytefld db ?
  • Lea bx, datatbl ?mov bx,offset datatbl??
  • Mov bytefld, bx

11
  • INC and DEC
  • Increments and decrements the contents of
    registers and memory locations by 1,respectively.
  • Format
  • label INC/DEC register/memory
  • Depending on the result,the operations clear or
    set the OF,SF,and ZF flags. This instruction does
    not set the carry flag.

12
  • INT
  • INT??????????????????????????,????????????????????
    ?BIOS?????????????????????????????
  • (An int instruction interrupts processing and
    accesses the interrupt vector table in low memory
    to determine the address of the requested
    routine.The operation then transfers to DOS or to
    BIOS for specified action and returns to your
    program to resume processing.)

13
  • INT performs the following
  • ??????????
  • ?????????
  • CS?????
  • ????(IP)(??????????)??
  • Causes the required operation to be performed
  • ????????IRET
  • The preceding process is entirely automatic.

14


?8-7?
???????
15
Questions
Page 106

6 - 2
6 - 3
6 - 6
6 - 7
6 13
Write a Comment
User Comments (0)
About PowerShow.com