The document describes using 8085 machine code instructions to simulate turning on appliances and lights based on input port values. It includes:
1) Loading values from input ports into registers B and C using MVI instructions
2) Transferring the value from B to the accumulator using MOV
3) Logically ORing the values in the accumulator and register C using ORA to combine the switch positions
4) Outputting the result to ports to control appliances
The document describes using 8085 machine code instructions to simulate turning on appliances and lights based on input port values. It includes:
1) Loading values from input ports into registers B and C using MVI instructions
2) Transferring the value from B to the accumulator using MOV
3) Logically ORing the values in the accumulator and register C using ORA to combine the switch positions
4) Outputting the result to ports to control appliances
The document describes using 8085 machine code instructions to simulate turning on appliances and lights based on input port values. It includes:
1) Loading values from input ports into registers B and C using MVI instructions
2) Transferring the value from B to the accumulator using MOV
3) Logically ORing the values in the accumulator and register C using ORA to combine the switch positions
4) Outputting the result to ports to control appliances
turn on the air conditioner, the coffeepot, and the kitchen
bytes the microprocessor can turn on the necessary appli Memory Machine Instructions To test Address Code Opcode Operand this HI-LO 06 MVI B,91H XX00 91 01 02 OE MVI C,A8H A8 03 78 MOV A,B 04 program, we must simulate the readings data into registers for example, into B and C. PROGRAM
Comments
;This instruction simulates read-
; ing input port 01H ;This instruction simulates read- ; ing input port OOH ;It is necessary to transfer data ; byte from B to A to OR with ; C. B and C cannot be ORed ; directly 05 B1 ;Combine ORA C the switch positions ; from registers B and C in the • accumulator OUT 06 PORT1 ;TurnD3on appliances and lights 07 PORT1 08 76 HLT ;End of the program PROGRAM OUTPUT By logically ORing the data bytes in registers B and C (B) (A) = 1 0 0 1 0 0 0 1 (9 1H) ( C) = 1 0 1 0 1 0 0 0 ( A8 H) (A)= 1 0 1 1 1 0 0 1 (B9H) Flag Status: S = 1, Z = 0, CY = 0
Data byte B9H is placed in the accumulator that turns on
the air conditioner, radio, cof- feepot, and bedroom and kitchen lights.
6.3.6 Review of Important Concepts
1. Logic operations are performed in relation to the contents of the accumulator. 2. Logic operations simulate eight 2-input gates (or inverters). 3. The Sign, Zero (and Parity) flags are modified to reflect the status of the operation. The Carry flag is reset. However, the NOT operation does not affect any flags. 4. After a logic operation has been performed, the answer is placed in the accumulator replacing the original contents of the accumulator.
ARDUINO PROGRAMMING FOR BEGINNERS: A Comprehensive Beginner's Guide, Tips and Tricks, Simple and Effective methods and Advanced methods to learn and understand Arduino Hardware and Software