You are on page 1of 14

EEE 4706

Project 3: Calculator
Section : B2 Group: 2

Members

Md Arefin Rabbi Emon - 170021134


H.M. Towfique - 170021145
Fariha Anzum - 170021118
Md. Ashekur Rahman - 170021099
Abdelrahman shohdy - 170021179
Contributions
Code
40%
Emon . 0%
25%
Schematic
Presentation
.

20%
Fariha . 0%
35%

30%
Turjo . 0%
10%

0%
Towfique . 60%
30%

10%
Shohdy 0%
. 40%
2
Our Schematic

3
Variables
OP1 First Number S Saving sign of result

OP2 Second Number TD Temporary Variable

OP Operand DF Digit Flag

R Lower Byte OF Operand Flag

RH Higher Byte for Multiplication EF Equal Flag

ZF Zero Flag
4
Code Explanation: Initialization

5
Code Explanation: Read
There are 4 combinations of a successful Read.

F6 F7 Main F6 F7 Main

F1 F2 F10 F9 F1 F2 F10 F8 F9
4 + 5 = 4 + 5 6 = F4 = Check for Double OP

F6 = Save Op
F5,6,10 F5,6,10
Main = Go to CALC_RESULT
F3 F4 Main F3 F4 Main

F1 F2 F10 F7 F9 F1 F2 F10 F7 F8 F9
4 5 + 6 = 4 5 + 6 6 =

6
Code Explanation: Read

7
Code Explanation: Read

8
Code Explanation: Calculation

9
Code Explanation: Printing
We are storing the result in R4, R3, R2, R1 registers.

A)91(E
8C
-----------
5 B R1

A)0E( 1 A R3
0A
-----------
4 B R2

R3R2R1 = 145
10
Code Explanation: 4 Digit Print for (*)

11
Code Explanation: 4 Digit Print for (*)

12
Summary & Simulation

13
Thank You

14

You might also like