Microprocessor and Microcontroller Lab 7 | Read Now
Microprocessor and Microcontroller Lab 7
7] To write and simulate c programs for ARM microprocessor using KEIL( demonstrate with the help of suitable program) Note: To use KEIL one may refer to the book: Insider’s guide to the ARM7 based microcontrollers, Hitex Ltd, 1st edition, 2005
7] Program code (lab7a.s)
#include<LPC21xx.c>
int main()
{
int a=6,b=2,sum,mul,sub,div;
sum=a+b;
mul=a*b;
sub=a-b;
div=a/b;
}
#include<LPC21xx.c>
int main()
{
int a=6,b=2,sum,mul,sub,div;
sum=a+b;
mul=a*b;
sub=a-b;
div=a/b;
}
#include<LPC21xx.c> int main() { int a=6,b=2,sum,mul,sub,div; sum=a+b; mul=a*b; sub=a-b; div=a/b; }
7] Program code ( lab7b.s)
#include<LPC21xx.h>
int main(void)
{
int a=0,b=1,and1,or1,exor1,not1;
and1=a&b;
or1=a/b;
exor=a^b;
not1=~a;
}
#include<LPC21xx.h>
int main(void)
{
int a=0,b=1,and1,or1,exor1,not1;
and1=a&b;
or1=a/b;
exor=a^b;
not1=~a;
}
#include<LPC21xx.h> int main(void) { int a=0,b=1,and1,or1,exor1,not1; and1=a&b; or1=a/b; exor=a^b; not1=~a; }