Question

Write an 8086 assembly language program to initialize counter 2 of 8253 in mode 0 with...

Write an 8086 assembly language program to initialize counter 2 of 8253
in mode 0 with a count of FFAAH.

Homework Answers

Answer #1

This program is used to initialize counter 2 of 8253 in mode 0 with a count of FFAAH

CODE:

COUNTER PROC NEAR

CNT2 EQU 8002H ; ADDRESS OF COUNTER 2

CNTR EQU 8003H ; ADDRESS OF CONTROL REGISTER

MOV AL, B0H ; CONTROL WORD

OUT CNTR, AL   

MOV AL, AAH ; INITIALIZING COUNT FFAAH

OUT CNTR2, AL

MOV AL, FFH ; INITIALIZING COUNT FFAAH

OUT CNTR2, AL

READ: MOV AL, 80H ; FOR READING THE COUNT

OUT CNTR, AL

IN AL, CNT2

MOV DL, AL

IN AL, CNT2

OR AL, DL

JNZ READ

RET

COUNTER ENDP

The below table can be referred for better understanding:

If you are satisfied with the above solution please give it a THUMBS UP!!!

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write an assembly language instruction to program the 82C55 to get data from port A and...
Write an assembly language instruction to program the 82C55 to get data from port A and send it to port B, if PA=IN, PB=OUT, PC0-PC3=IN, and PC4- PC7=OUT and operating in Mode 0. Use port addresses of 300H-303H for the 82C55 chip.
Write an assembly language program that will implement the following:       If ( (AX >=BX) AND (CX...
Write an assembly language program that will implement the following:       If ( (AX >=BX) AND (CX < DX) ) goto LoopA Else go to LoopB (Here I want you to write the whole assembly program that could run in CMD. THANK YOU
Write an assembly language program that reverses all the bits of a 32-bit number. (Without using...
Write an assembly language program that reverses all the bits of a 32-bit number. (Without using RBIT instruction) Write an assembly language program that checks whether an unsigned number is perfect square or not.
Write a mips assembly language program that asks the user to enter and integer number and...
Write a mips assembly language program that asks the user to enter and integer number and read it. Then ask him to enter a bit position (between 0 and 31) and display the value of that bit.
Write an assembly language program that will implement the following: If ( (AX >=BX) || (CX...
Write an assembly language program that will implement the following: If ( (AX >=BX) || (CX < DX) ) goto LoopA Else go to LoopB..
Write a program in assembly language for x86 Processors, that uses a loop to calculate the...
Write a program in assembly language for x86 Processors, that uses a loop to calculate the first seven values of the Fibonacci number sequence, described by the following formula: Fib(1) = 1, Fib(2) = 1, Fib(n) = Fib(n -1) + Fib(n - 2)
Write a program in ARM assembly language that copies each element of array A to consecutive...
Write a program in ARM assembly language that copies each element of array A to consecutive fourth elements of array B, i.e., A[0] to B[0], A[1] to B[3], A[2] to B[7], etc. The array A is 12 elements long, and each element is a number that is 32 bits (1 word) wide. Assume the base address of array A is in register R2, and the base address of array B is in R3.
EMBEDDED: Write a program in ARM assembly language that copies each element of array A to...
EMBEDDED: Write a program in ARM assembly language that copies each element of array A to consecutive fourth elements of array B, i.e., A[0] to B[0], A[1] to B[3], A[2] to B[7], etc. The array A is 12 elements long, and each element is a number that is 32 bits (1 word) wide. Assume the base address of array A is in register R2, and the base address of array B is in R3.
Please write a program in assembly language(by using EMU86 simulator), to calculate the 2450 by 30...
Please write a program in assembly language(by using EMU86 simulator), to calculate the 2450 by 30 (2450/30), and print out the result.
Assembly Language Programming Write a complete assembly program that inputs a small signed integer n, whose...
Assembly Language Programming Write a complete assembly program that inputs a small signed integer n, whose value can fit within 8 bits, and outputs the value of the expression n2 – n + 6. (This is not C++ or Java. Has to be masm file)
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT