like our page for more updates:
https://www.facebook.com/Technogroovyindia
With Best Regard's
Technogroovy Systems India Pvt. Ltd.
www.technogroovy.com
Call- +91-9582888121
Whatsapp- +91-8800718323
3. Description of SFR..
Accumulator (E0h) – It is an 8-bit register. It is the main Input register
of ALU(Arithmatic & Logical unit) & used in all arithmatic & logical
operations. The Bits of this register can be accessed by either name of
bits or by address of bits.
ACC.7 ACC.6 ACC.5 ACC.4 ACC.3 ACC.2 ACC.1 ACC.0
E7h
E6h
E5h
E4h
E3h
E2h
E1h
E0h
B (F0h) – It is also an 8-bit register. It is also the input register of
ALU(Arithmatic & Logical unit) & used in multiplication & divide
operations. The Bits of this register can be accessed by either name of
bits or by address of bits.
B.7
B.6
B.5
B.4
B.3
B.2
B.1
B.0
F7h
F6h
F5h
F4h
F3h
F2h
F1h
F0h
www.technogroovy.com, Cell- +917500347448 , +91-7533940322
4. Description of SFR..
Program Counter (PC – Not Addressable) – It is an 16 bit not
addressable register that contain the address of next instruction of
program that is to be executed.
DPTR (DPH,DPL – 83h,82h) - The Data Pointer (DPTR) consists of a high
byte (DPH) and a low byte (DPL). Its intended function is to hold a 16-bit
address. It may be manipulated as a 16-bit register or as two
independent 8-bit registers.
www.technogroovy.com, Cell- +917500347448 , +91-7533940322
6. • add- add a,source
ex-mov a,#25h
mov r1,#22h
add a,r1
a=a+r1(contents)
• Db(define byte)- db directive is the most
widely used data directive in the assembler.it
is used to define 8 bit data.
Org 00h
Data1: db 01010101b ;binary 35 in hex
www.technogroovy.com, Cell- +917500347448 , +91-7533940322
7. • Org- The org directive is used to indicate the
beginning of the address.
org 00h
org 50h
• Equ- This is used to define a constant without
occupying a memory location.
count equ 25
-------------------------mov r3,#count
www.technogroovy.com, Cell- +917500347448 , +91-7533940322
10. Unconditional Jump instructions
• LJMP(long jump)-it is a 3 byte instruction.it
allows a jump to any memory location from
0000 to ffffh.
• SJMP(short jump)-it is a 2 byte instruction.it
allows jump from oo to ffh.
www.technogroovy.com, Cell- +917500347448 , +91-7533940322
11. CALL instructions
• Call instruction is used to call a subroutine.it
saves the memory space.
• Types- LCALL and ACALL
• The difference between ACALL and LCALL is
the target address for lcall may be anywhere
within the 64 kbyte address while the target
address of acall must be within 2kbyte range.
www.technogroovy.com, Cell- +917500347448 , +91-7533940322
13. Arithmetic/Logical instruction
• Arithmetic instructions perform several
basic operations such as addition,
subtraction, division, multiplication etc.
• ADD INSTRUCTION
• ADD and ADDC both add the
value operand to the value of the
Accumulator, leaving the resulting value in
the Accumulator.
Examples:» ADD A,R0
» ADDC A, #data
:add register to accumulator
:add immediate data to Acc./carry
www.technogroovy.com, Cell- +917500347448 , +91-7533940322
15. Add 16 bit no.
• Add two 16 bit no,fc45h and 02ech
• Mov a,#45h
add a,#0ech
mov r0,a
mov a,#02h
addc a,#0fch
; 02+fc+1=ff
mov r1,a
www.technogroovy.com, Cell- +917500347448 , +91-7533940322
16. • SUBTRACT instruction
– SUBB subtract the value of operand from the value of
the Accumulator, leaving the resulting value in the
Accumulator.
Examples:» SUBB A,R0
:subtract register from
accumulator/Borrow
» SUBB A, #data
:subtract immediate data from Acc./Borrow
MULTIPLY instruction
MUL multiply the unsigned value of the
by the unsigned value of the register.
Examples:MUL AB
:multiply A and B.
www.technogroovy.com, Cell- +917500347448 , +91-7533940322
Accumulator
17. • Division instruction
Examples:DIV AB
:divide A by B.
A=Quotient(A/B)
B=Remainder(A/B)
– Increment & Decrement
Examples:INC A :increment accumulator.
INC @Ri :increment indirect RAM
DEC Rn :decrement register
DEC @Ri: increment indirect RAM
www.technogroovy.com, Cell- +917500347448 , +91-7533940322
18. Logical Operation
• AND Operation
Examples:
ANL A,Rn
ANL A, Direct
:And register to accumulator
:And direct byte to accumulator
• OR Operation
Examples:
ORL A,Rn
ORL A, Direct
:Or register to accumulator
:Or direct byte to accumulator
www.technogroovy.com, Cell- +917500347448 , +91-7533940322
19. • XoR Operation
Examples:
XRL A,Rn
XRL A, Direct
:Exclusive OR register to accumulator
: Exclusive OR direct byte to accumulator
• Complement Operation
Example: CPL A
: complement accumulator.
• Rotate instruction
Example: RL A
RR A
:rotate accumulator left
:rotate accumulator right
• Swap instruction
– SWAP A
:swap nibbles within the accumulator
• Exchange- xch a,r1
www.technogroovy.com, Cell- +917500347448 , +91-7533940322
20. Addressing Mode
• The way by which the address of the operand
(source or destination) are specified in the
instruction is known as Addressing mode.
www.technogroovy.com, Cell- +917500347448 , +91-7533940322
23. Register addressing mode
• Mov a,r0
• Mov r5,a
• Mov r0,b
Data between Rn register is not allowed i.e, MOV R4,R7
www.technogroovy.com, Cell- +917500347448 , +91-7533940322
24. Direct Addressing Mode
• Using this mode one can access internal data RAM
and SFR directly.
– Internal RAM uses addresses from 00H to 7FH.
– The SFR addresses exist from 80H to FFH.
Examples:
MOV R0,40H :move content of RAM location 40H in
R0
MOV 56H,A
:save content of A in RAM location 56H
MOV 90H,A
:save content of A in P1 (P1=90H)
www.technogroovy.com, Cell- +917500347448 , +91-7533940322
25. Register indirect addressing mode
• Mov a,@r0 ; move contents of ram location
whose address is held by r0 into A.
mov @r1,b ; move contents of B into ram
location whose address is held by r1.
Note- only r0 and r1 are used,r2 –r7 are not
used for this purpose.
www.technogroovy.com, Cell- +917500347448 , +91-7533940322
26. Index Addressing Mode
• In the indexed addressing mode, only program
memory can be accessed. The program
memory can only be read.
• Either the DPTR or PC can be used as Index
register.
Examples:
MOVC A, @A+DPTR
:copy the code byte, found at the
ROM address formed by adding A and DPTR, to A.
MOVC A, @A+PC : copy the code byte, found at the
ROM address formed by adding A
and pc, to A.
www.technogroovy.com, Cell- +917500347448 , +91-7533940322
27. Thank You
Industrial Training,B tech Projects,Final Year
Projects,Engineering Projects,Summer
Training,Embedded Systems,Embedded Systems
Project,Winter training,Readymade Projects,Buy
Projects,Corporate Training,Projects Assistance,Project
Maker,Project Report
offered By
Techogroovy Systems India Pvt Ltd ,
www.technogroovy.com, Cell- +91-7500347448 , +917533940322
• Mail : technogroovy@gmail.com
www.technogroovy.com, Cell- +917500347448 , +91-7533940322