Question: 5. WAP which tests if any bit is '0' in a data byte specified at an address 2000. If it is so, 00 would

5. WAP which tests if any bit is '0' in a data

5. WAP which tests if any bit is '0' in a data byte specified at an address 2000. If it is so, 00 would be stored at address 2001 and if not so then FF should be storedat the same address. 1. MVI B, 09 2. START 3. MVI C, 09H 4. BACK: MOV A, 5. INX H 6. CMP M 7. JC SKIP : "Initialize counter" : "LXI H, 2200H: Initialize memory pointer" : "Initialize counter 2" M: "Get the number" : "Increment memory pointer" : "Compare number with next, number" : "If less, don't interchange" : "If equal, don't interchange" 8. JZ SKIP 9. MOV D, M 10. MOV M, A 11. DCX H 12. MOV M, D 13. INX H 14. SKIP:DCR C 15. JNZ BACK 16. DCR B 17. JNZ START 18. HLT : "Interchange two numbers" : "Decrement counter 2" : "If not zero, repeat" : "Decrement counter 1" "Terminate program execution" 6. WAP to add t 10 bytes stored at memory location starting the result at memory location 300A

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mechanical Engineering Questions!