/* calculator Project for 8051---
Possible Operation- add, sub, mul, div
limitations- decimal part is truncated
result upto only 6decimals */
/* algorithm::
step1:store the entered values in an array
if any operator key is pressed goto step2
step2:store the var1 here (using convertArrayToDecimal() function)
and also store the operator pressed
if '=' operator is pressed goto step3
step3:do the respective operation and display the result */
#include<reg51.h>
#include"lcd_display.h"
int pow(int, int)
void convertArrayToDecimal(int*)
void clear_array()
void column1()
void column2()
void column3()
void column4()
char getkey()
sbit c1=P2^0
sbit c2=P2^1
sbit c3=P2^2
sbit c4=P2^3
sbit r1=P2^4
sbit r2=P2^5
sbit r3=P2^6
sbit r4=P2^7
int var1=0,var2=0,dummy_var,row,col
char values[4][4]={{55,56,57,'/'},
{52,53,54,'*'},
{49,50,51,'-'},
{' ',48,'=','+'}}
int num[5]
int i=0
void main()
{
char key
unsigned char operation
int var_count=0
int result