he automation of a light is designed by interfacing it with the output port having the address 01H of 8085 microprocessor unit (MPU). For this purpose, with the help of assembly language program load the bit pattern 91 H, in register-B and 87H in register-C of MPU. Mask all the bits except D, from registers B and C. If bit Do at logic 1 in both registers, turn on the light connected to D. position of the output port 01H; otherwise, turn off the light.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

he automation of a light is designed by interfacing it with the output port having the address 01H of 8085 microprocessor unit (MPU). For this purpose, with the help of assembly language program load the bit pattern 91 H, in register-B and 87H in register-C of MPU. Mask all the bits except D, from registers B and C. If bit Do at logic 1 in both registers, turn on the light connected to D. position of the output port 01H; otherwise, turn off the light.

Expert Solution
Step 1

 

he automation of a light is designed by interfacing it with the output port having the address 01H of 8085 microprocessor unit (MPU). For this purpose, with the help of assembly language program load the bit pattern 91 H, in register-B and 87H in register-C of MPU. Mask all the bits except D, from registers B and C. If bit Do at logic 1 in both registers, turn on the light connected to D. position of the output port 01H; otherwise, turn off the light.

 

 
Step 2

Ans.

The Flag register is a Special Purpose Register. Contingent on the worth of the outcome after any number juggling and coherent activity, the banner pieces become set (1) or reset (0). In 8085 chip, the banner register comprises of 8 pieces and just 5 of them are valuable. The 5 banners are:

Sign Flag (S) - After any activity if the MSB (B(7)) of the outcome is 1, it demonstrates the number is negative and the sign banner becomes set, for example 1. Assuming the MSB is 0, it shows the number is positive and the sign banner becomes reset for example 0. from 00H to 7F, sign banner is 0 from 80H to FF, sign banner is 1 1-MSB is 1 (negative) 0-MSB is 0 (positive) Example: MVI A 30 (load 30H in register A) MVI B 40 (load 40H in register B) SUB B (A = A - B) These arrangement of directions will set the sign banner to 1 as 30 - 40 is a negative number. MVI A 40 (load 40H in register A) MVI B 30 (load 30H in register B) SUB B (A = A - B) These arrangement of guidelines will reset the sign banner to 0 as 40 - 30 is a positive number.
Zero Flag (Z) - After any arithmetical or coherent activity in the event that the outcome is 0 (00)H, the zero banner becomes set for example 1, in any case it becomes reset for example 0. 00H zero banners is 1. from 01H to FFH zero banner is 0 1-zero-result 0-non-zero outcome Example: MVI A 10 (load 10H in register A) SUB A (A = A - A) These arrangement of directions will set the no banner to 1 as 10H - 10H is 00H
Assistant Carry Flag (AC) - This banner is utilized in the BCD number system(0-9). If after any number-crunching or sensible activity D(3) creates any convey and gives it to D(4) this banner becomes set for example 1, in any case, it becomes reset for example 0. This is the main banner register that isn't open by the developer 1-do from bit 3 on option or gets into bit 3 on deduction 0-in any case Example: MVI A 2BH (load 2BH in register A) MVI 39H (load 39H in register B) ADD B (A = A + B) These arrangement of directions will set the helper convey banner to 1, as on adding 2B and 39, the option of lower-request snack B and 9 will create a convey.
Equality Flag (P) - If after any math or coherent activity the outcome has even equality, a significantly number of 1 digit, the equality register becomes set for example 1, in any case it becomes reset for example 0. 1-collector has a much number of 1 pieces 0-gatherer has odd equality Example: MVI A 05 (load 05H in register A) This guidance will set the equality banner to 1 as the BCD code of 05H is 00000101, which contains a considerably number of ones for example 2.
Convey Flag (CY) - Carry is produced while performing n digit tasks and the outcome is more than n bits, then this banner becomes set for example 1, in any case, it becomes reset for example 0. During deduction (A-B), in the event that A>B it becomes reset, and if (A<B) it becomes set. Convey banner is likewise called the get banner. 1-complete from MSB bit on expansion or get into MSB bit on deduction 0-no do or acquire into MSB bit. Model: MVI A 30 (load 30H in register A) MVI B 40 (load 40H in register B) SUB B (A = A - B) These arrangement of guidelines will set the convey banner to 1 as 30 - 40 produces a convey/get. MVI A 40 (load 40H in register A) MVI B 30 (load 30H in register B) SUB B (A = A - B) These arrangement of directions will reset the sign banner to 0 as 40 - 30 creates no convey/get.

 

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Fundamentals of Computer System
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education