please write a program in assembly language and in C language to run under Microcontroller 8051.Indicate comments. Thanks
Automatic Traffic light controller In 8051 C Programming-
#include<stdio.h>
#include<reg51.h>
sbit RA = P1^0;sbit YA = P1^1;sbit GA = P1^2;
sbit rD = P1^3;sbit YD = P1^4;sbit GD = P1^5;
sbit RB = P3^2;sbit YB = P3^3;sbit GB = P3^4;
sbit RC = P3^5;sbit YC = P3^6;sbit GC = P3^7;
void Delay (void)
{
unsigned int a,b;
for (a=0;a<200;a++)
for (b=0;b<500;b++);
}
void SuperDelay()
{
unsigned int a;
for (a=0;a<25;a++)
Delay();
}
void main ()
{
P3 = 0;while (1)
{
RA = 0;GA = 1;YA = 0;RB = 1;
YC = 0;rD = 1;GD = 0;YD = 0;
GB = 0;YB = 0;RC = 1;GC = 0;
SuperDelay();
GA = 0;
YA = 1;
Delay();
RC = 1;GC = 0;YC= 0;
rD = 1;GD = 0;YD = 0;
RA = 1;GA = 0;YA = 0;
RB = 0;GB = 1;YB = 0;
SuperDelay ();
GB = 0;YB = 1;
Delay ();
RA = 1;GA = 0;YA = 0;
RC = 0;GC = 1;YC = 0;
rD = 1;GD = 0;YD = 0;
RB = 1;GB = 0;YB = 0;
SuperDelay ();
GD = 1;YD = 0;
GC = 0;YC = 0;rD = 0;
SuperDelay ();
GD = 0;YD = 1;
Delay();
}
}
please write a program in assembly language and in C language to run under Microcontroller 8051.Indicate comments. T...
In 8051 microcontroller to program it using Assembly. Write an assembly program to generate one pulse with high duration of 5 ms and low duration of 2.5 ms using timer 0 with XTAL = 11.0592MHz.
Problem 1: a) Write LEGv8 assembly language programs for the following C program fragments. Please make sure to add any necessary comments. P[20] = P[10] + P[30] + 25; b) Show the machine code that will be generated by the assembly code in Problem 1.a. You can write machine code as decimal numbers. please help me solve this
In
PEP8 code.
assembly pep8 code.
30. Write an assembly language program that corresponds to the following C+ program #include <iostream> using namespace std; int num; int main() cin >> num: num = num/ 16; cout << "num = " << num << endl; return 0; 21 de
Code in assembly language please
"Write an assembly 32 bit program that adds two numbers (other than 5 and 6) and stores the value to a variable called 'sum'. Also, use a block COMMENT to depict the name and description of the program, author of the program, and date."
ARM assembly language Write a program "fibonacci.s" that computes the Nth Fibonacci number where N is not so large that overflow of integer arithmetic is a concern. When your assembly language program is called it should expect the value of N to be passed using register r0 and your program should return the Nth Fibonacci number in register r0. Please include comments as well. Do not just use the output generated by gcc -S
. Write an 8086 assembly language program to find the prime numbers among 100 bytes of data in an array stored from the address 4000H: 1000H in the data segment and store the result from the address 4000H: 3000H. write the code using 8086 assembly language only i do not want any other language If you Do not sure please do not solve it
Assembly Language: Write and run a program to find the values of each destination operand: .data varB BYTE 65h,31h,02h,05h varW WORD 6543h,1202h varD DWORD 12345678h .code mov ax, WORD PTR [varB+2] ; a= mov bl, BYTE PTR varD ; b= mov bl, BYTE PTR [varW+2] ; c= mov ax, WORD PTR [varD+2] ; d= mov eax,DWORD PTR varW ; e=
write a program to find matrix B and C multiplication using assembly on 8051 Initialization: ORG 400H MATRIXA: DB 4, 6, 8, 1, 3. 6, 9, 3, 2 ORG 410H MATRIXB: DB 2,4,7, 4, 5,7, 3, 1,1 ORG 420H MATRIXB: DB 1, 3, 4.8, 7, 5, 3,8,9 ORG 430H RESULTDB 0, 0, 0, 0, 0, 0, 0, 0, 0 ORG 440H SIGR: DB 0, 0, 0, 0,0, 0, 0, 0, 0
write a program to find matrix B and C...
Step 1. Write a program in assembly language (using macros) to print out the following messages on the screen [20 marks]: Hello, programmers! Welcome to the world of, Linux assembly programming! Step 2. Write a C function to passed two numbers to the function and calculate the sum of all the numbers between them (both inclusive). [50 marks] a. Make a version with for loop b. Make a version with while loop c. Make a version with do.. while loop...
Make a Complete Code in C++ language. Create a Complete program of Tower of Hanoi. Write the code in easy way means coding should of beginner level. Also use more and more comments in the code for better understanding. The code should complete and should able to run. Also provide output of the program.