Question

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.

Homework Answers

Answer #1

;labelling addresses for each port and control register

porta equ 300h

portb equ 301h

portc equ 302h

creg equ 303h

;initalising 8255

mov al,10010001b

out creg,al

;taking data from port A

in al, porta

;sending to port A

out portb, al

The bits sent to control register for initialisation are as follows (0 is LSB):

7 - 0 for BSR mode and 1 for regular input output mode

6, 5 - mode for port A (mode 0 will be 00)

4 - Port A, 1 for input and 0 for output

3 - Port C upper, 1 for input and 0 for output

2 - mode for port B (mode 0 will be 0)

1 - Port B, 1 for input and 0 for output

0 - Port C lower,1 for input and 0 for output

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 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.
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.
Please complete in MASM (x86 assembly language). Use the code below to get started. Write a...
Please complete in MASM (x86 assembly language). Use the code below to get started. Write a program 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). .386 .model flat,stdcall .stack 4096 ExitProcess PROTO,dwExitCode:DWORD .data    ; define your variables here .code main PROC    ; write your assembly code here    INVOKE ExitProcess,0 main...
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.
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
FROM The HCS12 / 9S12 (2nd Edition) E4.19 please use C language to write the code...
FROM The HCS12 / 9S12 (2nd Edition) E4.19 please use C language to write the code and submit the code and pictures of the running circuit on the board. (1) Write an instruction sequence to configure Port A and Port B for input and output, respectively; read the value of Port A and output the value to Port B.
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 a MIPS assembly program to get an integer input from the user and multiply it...
write a MIPS assembly program to get an integer input from the user and multiply it by 2 and print output to the console
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 Hack Assembly Language program to calculate the quotient from a division operation. The values...
Write a Hack Assembly Language program to calculate the quotient from a division operation. The values of dividend a and divisor b are stored in RAM[0] (R0) and RAM[1] (R1), respectively. The dividend a is a non-negative integer, and the divisor b is a positive integer. Store the quotient in RAM[2] (R2). Ignore the remainder. Example: if you are given two numbers 15 and 4 as dividend a (R0) and divisor b (R1), respectively, the answer will be 3 stored...