BCSL-022 Assembly Language Programming Lab Solved Assignment 2022-23
|Course Title||Assembly Language Programming Lab|
|Submission Date||31st October 2022 (For July Session)
15th April 2023 (For Jan Session)
- Complete Assignments
- Lowest Price
- Secure Payments
Q1. Design a two-bit counter circuit that does reverse counting. It has the states: 11, 10, 01 and 00. The initial state of the counter may be assumed to be 11. The counter will be in following successive states: 11, 10, 01, 00, 11, 10, 01, 00, 11…Use J-K flip flops to design the circuit. You should design the circuit using state transition diagram and Karnaugh’s maps.
Q2. Write and run following programs using 8086 assembly language.
(a) Write and run an 8086-assembly language program that accepts two input digits from the keyboard and converts it into a two-digit packed BCD number. This resultant number should be stored in a byte location in the memory. For example, if you input digit ‘3’ and ‘5’ then it will be converted to packed BCD number 35, which is 001101012. This result
should be stored in a byte memory location.
(b) Write and run (using appropriate calling program) a near procedure in 8086-assembly language, which is passed a single parameter by the calling program. The procedure checks if the input parameter is divisible by 5 or not. If the input parameter is divisible by 5, then a value of 1 is returned to the calling program, else a value 0 is returned. The
calling program based on the returned value prints “Divisible” or “NOT Divisible”. You may assume that the parameter value would always be greater than or equal to 1. Make and state suitable assumptions, if any.
(c) Write and run an 8086-assembly language program that computes the multiplication of 5 natural numbers, starting from number 2. You should use the looping construct to write this program. The result is stored in a word memory location. Make and state suitable assumptions, if any