1 / 7

Addressing Modes

Addressing Modes. Six Memory Addressing Modes are supported Direct Addressing Memory address is directly specified mov [1234H],ax DS x 10H + DISP mov value, ax mov ax, buffer add bl, value cmp cx, count. Addressing Modes. Register Indirect Addressing

Download Presentation

Addressing Modes

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. Addressing Modes • Six Memory Addressing Modes are supported • Direct Addressing • Memory address is directly specified • mov [1234H],ax DS x 10H + DISP • mov value, ax • mov ax, buffer • add bl, value • cmp cx, count Lecture 17

  2. Addressing Modes • Register Indirect Addressing • The effective address of memory is the contents of a register • mov [bx],cl DS x 10H + BX • [si], [di], [bx] with respect to DS • [bp] with respect to SS • mov ax, [si] • add bl, [di] • cmp cx, [bx] Lecture 17

  3. Addressing Modes • Based or Register Relative Addressing • The effective memory address is the sum of a base register and a displacement • List[bx], [bp+1] • mov cl, [bx+4] DS x 10H + BX + 4 • mov ax, list[bx] • add bl, [bx+7] • cmp cx, [bp-3] Lecture 17

  4. Addressing Modes • Indexed Addressing • The effective memory address is the sum of an index register and a displacement • mov [bx+2], bp DS x 10H + BX + 2 • List[si], [list + di], [di+2] • mov ax, list[si] • add bl, [number+di] • cmp cx, [di+2] Lecture 17

  5. Addressing Modes • Base Indexed or Base-Plus-Index Addressing • The effective memory address is the sum of a base register and an index register • [bx+si], [bx][di], [bp+di] • mov [bx+si], bp DS x 10H + BX + SI will use DS as default seg • mov ax, [bx+si] • add bl, [bx][si] • cmp cx, [bp+di] Lecture 17

  6. Addressing Modes • Base Indexed with Displacement or Base Relative-Plus-Index Addressing • The effective memory address is the sum of base register, index register and a displacement • [bx+si+2], list[bx+di] • mov array[bx + si], dx DS x 10H + ARRAY + BX + SI • mov ax, array[bx+si] • add bl, [bx+di+2] • cmp cx, 2[bp+di] Lecture 17

  7. Addressing Modes • Summary | bx | si | disp | | | | bp | di | Lecture 17

More Related