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 8088/8086 assembly program that counts the length of a null terminated string that starts...
Write an 8088/8086 assembly program that counts the length of a null terminated string that starts at location STR. Print the result on the screen.
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 for 8085 microprocessor to read consecutive memory locations from 2000 to...
write an assembly language program for 8085 microprocessor to read consecutive memory locations from 2000 to 2FFF & transfer to 4000 to 4FFF,if interrupted display the current count at port5 this is for 8085 microprocessor for interrupt we have to write a program & subroutine
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.