1 / 25

Handout 2 Digital System Engineering ( EE-390 ) (Ref: Text book and

Handout 2 Digital System Engineering ( EE-390 ) (Ref: Text book and KFUPM Online course of EE-390) (Remember to solve all the related examples, exercises problems as given in the Syllabus). MOV Statement. Mem. contents. P.A’s. 0202. 01. 00. Addressing Modes. Accumulator.

annora
Download Presentation

Handout 2 Digital System Engineering ( EE-390 ) (Ref: Text book and

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Handout 2 Digital System Engineering (EE-390) (Ref: Text book and KFUPM Online course of EE-390) (Remember to solve all the related examples, exercises problems as given in the Syllabus)

  2. MOV Statement Mem. contents P.A’s 0202 01 00

  3. Addressing Modes Accumulator

  4. A) Register Operand Addressing Mode Mem. contents P.A’s 02F2 1B D7

  5. A) Register Operand Addressing Mode Mem. contents P.A’s 0262 1B

  6. B) Immediate Operand Addressing Mode Mem. contents P.A’s 0403 4A 1F

  7. B) Immediate Operand Addressing Mode Mem. contents P.A’s 0402 28 XX

  8. Valid and Invalid Instructions MOV CL, AH  VALID MOV CX, SP  VALID MOV CH, DX  INVALID MOV 15H, AL  INVALID MOV CL, 1234H  INVALID MOV IP, CX  INVALID MOV CS, DS  INVALID MOV CL, 234H  INVALID

  9. C) Memory Operand Addressing Mode 1) Direct Memory Addressing 2) Indirect Memory Addressing a) Register Indirect Addressing b) Based Addressing c) Indexed Addressing d) Based-Indexed Addressing

  10. C) Memory Operand Addressing Mode PA = Segment Base Address (SBA) : Effective Address (EA) = SBA : EA EA (called Effective or Offset) is EA = Base + Index + Displacement PA = SBA : Base + Index + Displacement CS SS DS ES BX BP SI DI 8-bit displacement 16-bit displacement PA = : + +

  11. 1) Direct Addressing Mode Mem. contents P.A’s 0012 Code segment D2 3F data segment

  12. 1) Direct Addressing Mode Mem. contents P.A’s 0014 3F XX

  13. 1) Direct Addressing Mode Mem. contents P.A’s 0014 52

  14. 2) Register Indirect Addressing Mode Mem. contents P.A’s 0012 CA 5D

  15. 2) Register Indirect Addressing Mode Mem. contents P.A’s 0012 XX 5D

  16. NOTE By default, using a direct address as [1FA4H], or a register indirect address as [SI] or [DI] assumes you are accessing the DATA SEGMENT. MOV AX, [1FA4H]  MOV AX, DS:[1FA4H] To access any other segment, use the “SEGMENT OVERIDE PREFIX” as MOV AX, CS:[1FA4H] MOV SS:[DI] , AX

  17. 3) Based Addressing Mode Base Register  Points to first address of data (Constant) Displacement  Contains number of bytes above base register where data of interest exists (Variable) When Base Register is BX PA = DS : BX + Displacement When Base Register is BP PA = SS : BP + Displacement These are default segments and Segment-Override Prefix changes them

  18. 3) Based Addressing Mode Mem. contents P.A’s 0014 XX 5D

  19. 3) Based Addressing Mode Mem. contents P.A’s 0014 XX 5D

  20. 4) Indexed Addressing Mode Displacement  Points to first address of data (Constant) Index Register  Contains number of bytes above Displacement where data of interest exists (Variable) When Index Register is SI PA = DS : SI + Displacement When Base Register is DI PA = DS : DI + Displacement These are default segments and Segment-Override Prefix changes them

  21. 4) Indexed Addressing Mode Mem. contents P.A’s 0014 XX 99

  22. 4) Indexed Addressing Mode Mem. contents P.A’s 0014 10 12

  23. 5) Based-Indexed Addressing Mode Displacement  Points to first address of data (Constant) Base Register  Contains Matrix Column Number (Variable) Index Register  Contains Matrix Row Number (Variable) Regardless of using SI or DI When Base Register is BX PA = DS : BX + (SI or DI) + Displacement When Base Register is BP PA = SS : BP + (SI or DI) + Displacement These are default segments and Segment-Override Prefix changes them

  24. 5) Based-Indexed Addressing Mode Mem. contents P.A’s 0014 XX 99

  25. 5) Based-Indexed Addressing Mode Mem. contents P.A’s 0014 77 FF

More Related