10. COA _ CU _ Addressing Modes
10. COA _ CU _ Addressing Modes
Eg: MOV CL, [2000H] ; CL Register gets data from memory location 2000H
; CL ç [2000H]
Eg: MOV [3000H], DL ; Memory location 3000H gets data from DL Register
; [3000H] ç DL
Eg: MOV CL, [BX] ; CL gets data from a memory location pointed by BX
; CL ç [BX]. If BX = 2000H, CL ç [2000H]
Eg: MOV [BX], CL ; CL is stored at a memory location pointed by BX
; [BX] ç CL. If BX = 2000H, [2000H] ç CL.
www.BharatAcharyaEducation.com
All the best J Video Lectures for COA coming up very soon! Page 62
COMPUTER ORGANIZATION & ARCHITECTURE
Sem IV (Computers, IT) | Sem VI (Electronics)
Author: Bharat Acharya
Mumbai | 2018
Eg: MOV CL, [BX + 03H] ; CL gets data from a location BX + 03H
; CL ç [BX+03H]. If BX = 2000H, then CL ç [2003H]
Eg: MOV [BX + 03H], CL ; CL is stored at location BX + 03H
; [BX+03H] ç CL. If BX = 2000H, then [2003H] ç CL.
www.BharatAcharyaEducation.com
All the best J Video Lectures for COA coming up very soon! Page 63
BHARAT ACHARYA EDUCATION
Videos | Books | Classroom Coaching
E: [email protected]
M: 9820408217
Eg: MVI A, 35H ; Move immediately the value 35 into the Accumulator. i.e. A ß 35H
LXI B, 4000H ; Move immediately the value 4000 into BC register pair. i.e. BC ß 4000H
Advantage:
Programmer can easily identify the operands.
Disadvantage:
Always more than one byte hence requires more space.
The µP requires two or three machine cycles to fetch the instruction hence slow.
Advantage:
Instructions are of one byte so only one cycle is required to fetch them.
Disadvantage:
Operands cannot be easily identified.
Eg: LDA 2000H ; Loads “A” register with Contents of Location 2000. i.e. A ß [2000]
STA 2000H ; Stores the Contents of “A” register at the Location 2000. i.e. [2000] ß A
Advantage:
The programmer can identify the address of the operand.
Disadvantage:
These are three byte instructions hence require three fetch cycles.
www.BharatAcharyaEducation.com
All the best J Video Lectures for COA coming up very soon! Page 60
COMPUTER ORGANIZATION & ARCHITECTURE
Sem IV (Computers, IT) | Sem VI (Electronics)
Author: Bharat Acharya
Mumbai | 2018
E.g.:: LDAX B ; Loads “A” register with the contents of the memory Location pointed by BC Pair
; So if BC pair = 4000 i.e. [BC] = 4000 then A ç [4000].
#Please refer Bharat Sir's Lecture Notes for this ...
STAX B ; Stores the contents of the Accumulator at the memory location pointed by BC pair.
; So if contents of BC pair = 4000 i.e. [BC] = 4000 then [4000] ç A.
#Please refer Bharat Sir's Lecture Notes for this ...
Advantage:
Address of the operand is not fixed and hence can be used in a loop.
Disadvantage:
Requires initialization of the register pair hence more complex.
Advantage:
Instructions are generally only one byte.
Disadvantage:
Rigid, as it works only on a fixed operand.
www.BharatAcharyaEducation.com
All the best J Video Lectures for COA coming up very soon! Page 61