Download presentation
Presentation is loading. Please wait.
Published byἩσίοδος Δημητρακόπουλος Modified over 5 years ago
1
CS-401 Computer Architecture and Assembly Language Programming
Lecture-6 Addressing Modes
2
Lets revise the last lecture
3
Memory Access Size
4
Memory Access Forms 16-bit Move mov ax, [num1]
5
Memory Access Forms 8-bit Move mov al, [num1]
6
Memory Access Forms Illegal Move mov ax, bl ; size mismatch
mov [num1],[num2] ; mem to mem move
7
Memory Access Forms Ambiguous Move
mov [num1], 5 ;5 is byte or ;word? Ambiguous mov byte[num1], 5 ;move 5 as byte mov word[num1], 5 ;move 5 as word
8
Loop Control L1: mov ax, bx add bx,2 sub cx,1
… L1: mov ax, bx add bx,2 sub cx,1 jnz L1 ; Jump to location L1 ; if the zero flag is ; not set
9
Loop Control mov cx, 10 ; load numbers count
… mov bx, num1 ; point bx to first number mov cx, ; load numbers count add ax, [bx] ; add number pointed by bx to ; ax l1: add bx, 2 sub cx, 1 jnz l1 mov [num1+20], ax ; write back result num1: dw 5…
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.