Write an assembler program that converts the first four binary bits connected to port A and store the converted number in the register 24 and converts the last four binary bits connected to port A and store the converted number in the register 22. Your application should perform the following:
3.1. If the number is register 24 is even , substract the number stored in 24 by the number stored in 22 and store the difference in register 24. If the difference is positive multiply the by 10 and stored the result.
3.2. If the number is register 24 is odd , add the number stored in 24 by the number stored in 22 and store the sum in register 25. If the sum is above 45, divide the number stored in register 25 by 3 and store the result in 26h.
Test your code using the last 2 numbers of your student number connected to Port A.
Comments
Leave a comment