Question: please solve all 42. Write instruction to load two unsigned numbers in register B and register C, respectively, subtract from B, if the result is

 please solve all 42. Write instruction to load two unsigned numbers

in register B and register C, respectively, subtract from B, if the

result is in 2's Complement, convert the result in absolute magnitude and

please solve all

42. Write instruction to load two unsigned numbers in register B and register C, respectively, subtract from B, if the result is in 2's Complement, convert the result in absolute magnitude and display it at PORTI; otherwise, display the positive result 43. A system is designed to monitor the temperature of a furnace. Temperature readings are recorded in 16 bits and stored in memory locations starting at XX60H. The high- order byte is stored first and the low-order byte is stored in the next consecutive memory location. However, the high-order byte of all the temperature readings is constant. Write a program to transfer low-order readings to consecutive memory locations starting at XX80H and discard the high-order bytes. Temperature Readings (H) 0581.0595,0578, 057 A, 0598 44. A string of six data bytes is stored starting from memory location 2050H. The string includes some blanks (bytes with zero value). Write a program to eliminate the blanks from the string. (Hint: To check a blank, set the Zero flag by using the ORA. Use two memory pointers: one to get a byte and the other to store the byte.) Data(H) F2.00, 00, 4A, 98,00 45. A bar code scanner scans the boxes being shipped from the loading dock and records all the codes in computer memory; the end of the data is indicated by the byte 00. The code 1010 0011 (A3H) is assigned to 19" television sets. Write a program to count the number of 19" television sets that were shipped from the following data set. Data(H) FA, 67, A3, B8, A3, A3, FA, 00 50. Write 8085 ALP to evaluate the following:- Y = -1X N is stored at memory location 2400H and Xi's are stored at subsequent locations. Store Y at location 2500H and 2501H, You should invoke a subroutine for finding the X 52. Set up a delay of 10 ms. Assume 3MHz to be the microprocessor clock frequency 53. Write a program to count from 0 to 9 with a one-second delay between each count. At the count of 9, the counter should reset itself to 0 and repeat the sequence 17/0 continuously. Use register pair HL to set up the delay, and display each count at port 01H, Assume the clock frequency of the microcomputer is 2 MHz, draw flow chart. 54. Write a program which will store the contents of accumulator and flag register at 2000 H and 2001 H memory locations respectively. 55. Write a program to generate a continuous square wave with the period of 500 uS. Assume the system clock period is 325 ns, and use bit DO to output the square wave. 56. Registers SP = 3000H, HL = 2000H, A = 66H. Show in a Table, the contents of the above registers, the PC & Stack, after each instruction in the program below Mem AL code 1000H MOV LA 1001H PUSH H 1002H CALL 708DH 1005H XRA A 1006H POP H 10071 HLT 57. Explain the functions of the following routines: a. LXI SP,209FH LXI SP.STACK MVI COOH PUSHB PUSHB PUSHD POP PSW POP B RET POP D RET b. 58. A set of ten BCD readings is stored in the Input Buffer. Convert the numbers into binary and add the numbers. Store the sum in the Output Buffer; the sum can be larger than FFH. 59. Design a counter to count continuously from 00H to FFH with 500 ms delay between each count. Display the count at PORT1 and PORT2 (one digit per port) with a common-anode seven-segment-LED code. 60. A set of ASCII Hex digits is stored in the Input-Buffer memory. Write a program to convert these numbers into binary. Add these numbers in binary, and store the result in the Output-Buffer memory, convert the result from binary to ASCII Hex code. 61. Design a down-counter to count from 99 to 0 in BCD with 500 ms delay between each count. Display the count at an output port. Hint: Check for the low-order digit: when it reaches zero, adjust the next digit to nine. 42. Write instruction to load two unsigned numbers in register B and register C, respectively, subtract from B, if the result is in 2's Complement, convert the result in absolute magnitude and display it at PORTI; otherwise, display the positive result 43. A system is designed to monitor the temperature of a furnace. Temperature readings are recorded in 16 bits and stored in memory locations starting at XX60H. The high- order byte is stored first and the low-order byte is stored in the next consecutive memory location. However, the high-order byte of all the temperature readings is constant. Write a program to transfer low-order readings to consecutive memory locations starting at XX80H and discard the high-order bytes. Temperature Readings (H) 0581.0595,0578, 057 A, 0598 44. A string of six data bytes is stored starting from memory location 2050H. The string includes some blanks (bytes with zero value). Write a program to eliminate the blanks from the string. (Hint: To check a blank, set the Zero flag by using the ORA. Use two memory pointers: one to get a byte and the other to store the byte.) Data(H) F2.00, 00, 4A, 98,00 45. A bar code scanner scans the boxes being shipped from the loading dock and records all the codes in computer memory; the end of the data is indicated by the byte 00. The code 1010 0011 (A3H) is assigned to 19" television sets. Write a program to count the number of 19" television sets that were shipped from the following data set. Data(H) FA, 67, A3, B8, A3, A3, FA, 00 50. Write 8085 ALP to evaluate the following:- Y = -1X N is stored at memory location 2400H and Xi's are stored at subsequent locations. Store Y at location 2500H and 2501H, You should invoke a subroutine for finding the X 52. Set up a delay of 10 ms. Assume 3MHz to be the microprocessor clock frequency 53. Write a program to count from 0 to 9 with a one-second delay between each count. At the count of 9, the counter should reset itself to 0 and repeat the sequence 17/0 continuously. Use register pair HL to set up the delay, and display each count at port 01H, Assume the clock frequency of the microcomputer is 2 MHz, draw flow chart. 54. Write a program which will store the contents of accumulator and flag register at 2000 H and 2001 H memory locations respectively. 55. Write a program to generate a continuous square wave with the period of 500 uS. Assume the system clock period is 325 ns, and use bit DO to output the square wave. 56. Registers SP = 3000H, HL = 2000H, A = 66H. Show in a Table, the contents of the above registers, the PC & Stack, after each instruction in the program below Mem AL code 1000H MOV LA 1001H PUSH H 1002H CALL 708DH 1005H XRA A 1006H POP H 10071 HLT 57. Explain the functions of the following routines: a. LXI SP,209FH LXI SP.STACK MVI COOH PUSHB PUSHB PUSHD POP PSW POP B RET POP D RET b. 58. A set of ten BCD readings is stored in the Input Buffer. Convert the numbers into binary and add the numbers. Store the sum in the Output Buffer; the sum can be larger than FFH. 59. Design a counter to count continuously from 00H to FFH with 500 ms delay between each count. Display the count at PORT1 and PORT2 (one digit per port) with a common-anode seven-segment-LED code. 60. A set of ASCII Hex digits is stored in the Input-Buffer memory. Write a program to convert these numbers into binary. Add these numbers in binary, and store the result in the Output-Buffer memory, convert the result from binary to ASCII Hex code. 61. Design a down-counter to count from 99 to 0 in BCD with 500 ms delay between each count. Display the count at an output port. Hint: Check for the low-order digit: when it reaches zero, adjust the next digit to nine

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 Databases Questions!