0% found this document useful (0 votes)
102 views14 pages

SAP-1 SAP-2: EEE 415 - Microprocessors and Embedded Systems

Uploaded by

Shovon Roy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
102 views14 pages

SAP-1 SAP-2: EEE 415 - Microprocessors and Embedded Systems

Uploaded by

Shovon Roy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

3/6/21

EEE 415 – Microprocessors and


Embedded Systems

Week 2 – SAP Architectures

2.1 SAP-2

Dr. Sajid Muhaimin Choudhury


Dept of EEE, BUET

Ref: Chapter 11, Malvino Brown, Digital Computer Electronics


1

SAP-1 SAP-2

© Dr. S. M. Choudhury, EEE, BUET. Please do not


3/6/21
redistribute without prior permission 2

1
3/6/21

Bidirectional Register

© Dr. S. M. Choudhury, EEE, BUET. Please do not


3/6/21
redistribute without prior permission 3

© Dr. S. M. Choudhury, EEE, BUET. Please do not


3/6/21
redistribute without prior permission 4

2
3/6/21

© Dr. S. M. Choudhury, EEE, BUET. Please do not


3/6/21
redistribute without prior permission 5

© Dr. S. M. Choudhury, EEE, BUET. Please do not


3/6/21
redistribute without prior permission 6

3
3/6/21

© Dr. S. M. Choudhury, EEE, BUET. Please do not


3/6/21
redistribute without prior permission 7

© Dr. S. M. Choudhury, EEE, BUET. Please do not


3/6/21
redistribute without prior permission 8

4
3/6/21

© Dr. S. M. Choudhury, EEE, BUET. Please do not


3/6/21
redistribute without prior permission 9

Memory Instructions
• LDA – Load Accumulator • MOV – Move between register
• MOV A,B
• STA- Store Accumulator
• MOV A,C
• MVI – Move Immediate • MOV B,A
• MVI A, Byte
• MOV B,C
• MVI B, Byte • MOV C,A
• MVI C, Byte
• MOV C,B

© Dr. S. M. Choudhury, EEE, BUET. Please do not


3/6/21
redistribute without prior permission 10

10

5
3/6/21

Arithmetic Instructions
• ADD – Add to accumulator • INR – Increment
• ADD B • INR A
• ADD C • INR B
• INR C

• SUB – Subtract from accumulator • DCR – Decrement


• SUB B • DCR A
• SUB C • DCR B
• DCR C

© Dr. S. M. Choudhury, EEE, BUET. Please do not


3/6/21
redistribute without prior permission 11

11

Branch Instructions – Unconditional Jump


• JMP – Jumps to specified address.
Changes PC to specific address.
Unconditional
• JMP 3000H

© Dr. S. M. Choudhury, EEE, BUET.


3/6/21
Please do not redistribute without prior permission 12

12

6
3/6/21

Branch Instructions – Call-Ret


• CALL – Will go to given memory
address unconditionally.
• CALL 5000H
• RET – Will return to the next
address after the call
• RET

© Dr. S. M. Choudhury, EEE, BUET.


3/6/21
Please do not redistribute without prior permission 13

13

Flags

© Dr. S. M. Choudhury, EEE, BUET.


3/6/21
Please do not redistribute without prior permission 14

14

7
3/6/21

Branch Instructions – Conditional Jump


• JM – Jump if minus(negative).
Checks SF
• JM 3000H
• JZ – Jump if zero. Checks ZF
• JZ 3000H
• JNZ – Jump if not zero.
• JNZ 3000H

© Dr. S. M. Choudhury, EEE, BUET.


3/6/21
Please do not redistribute without prior permission 15

15

© Dr. S. M. Choudhury, EEE, BUET.


3/6/21
Please do not redistribute without prior permission 16

16

8
3/6/21

© Dr. S. M. Choudhury, EEE, BUET.


3/6/21
Please do not redistribute without prior permission 17

17

Bit-wise Logic Instructions


• CMA – Complement Accumulator • ANI – Add Immediate
• CMA • ANI 30H
• ADD C • ORI – OR Immediate
• ANA – AND with Accumulator • ORI 30H
• ANA B • XRI – XOR Immediate
• ANA C • XRI 30H
• ORA – OR with Accumulator
• XRA – XOR with Accumulator

© Dr. S. M. Choudhury, EEE, BUET. Please do not


3/6/21
redistribute without prior permission 18

18

9
3/6/21

Rotate Operations
• RAL – Rotate Accumulator Left

• RAR – Rotate Accumulator Right

© Dr. S. M. Choudhury, EEE, BUET.


3/6/21
Please do not redistribute without prior permission 19

19

© Dr. S. M. Choudhury, EEE, BUET. Please do not


3/6/21
redistribute without prior permission 20

20

10
3/6/21

© Dr. S. M. Choudhury, EEE, BUET. Please do not


3/6/21
redistribute without prior permission 21

21

© Dr. S. M. Choudhury, EEE, BUET. Please do not


3/6/21
redistribute without prior permission 22

22

11
3/6/21

© Dr. S. M. Choudhury, EEE, BUET. Please do not


3/6/21
redistribute without prior permission 23

23

T-states: SAP-2 has variable machine cycle control sequence.


Different instructions take different time to execute.

© Dr. S. M. Choudhury, EEE, BUET. Please do not


3/6/21
redistribute without prior permission 24

24

12
3/6/21

© Dr. S. M. Choudhury, EEE, BUET.


3/6/21
Please do not redistribute without prior permission 25

25

© Dr. S. M. Choudhury, EEE, BUET.


3/6/21
Please do not redistribute without prior permission 26

26

13
3/6/21

Solution

© Dr. S. M. Choudhury, EEE, BUET.


3/6/21
Please do not redistribute without prior permission 27

27

Solution

© Dr. S. M. Choudhury, EEE, BUET.


3/6/21
Please do not redistribute without prior permission 28

28

14

You might also like