Micro processor lab

back 

Contains MASM (Microsoft assembler) for windows too!!

Some programs will be available soon

1.a. Write an ALP to find LCM of two16 bit unsigned integers.
1.b. Write an ALP to drive a stepper motor (clockwise). 

2.a. Write an ALP to find GCD of two 16 bit unsigned integers.
2.b. Write an ALP to drive a stepper motor (anti-clockwise).

3.a.  Write an ALP to sort 16 bit unsigned integers using insertion sort  .
3.b.  Write an ALP to generate a rectangular pulse train using DAC 

4.a. Write an ALP to sort 16 bit unsigned integers using bubble sort. 
4.b. Write an ALP to generate triangular waveform using DAC interface  .

5.a. Write an ALP containing PUBLIC declarations for 10 bytes of data and PUBLIC code for procedure READKB to read from keyboard.  Create a second source file with EXTRN declaration for data and READKB procedure of the first source file. This program calls the READKB routine ten times.    
 5.b. Write an ALP to read the status of two inputs from logic controller interface and to display the output of two Boolean expression of the inputs 
          I.  A EXOR B OR C
          II. A AND B EXOR A  

6.a.  Create an assembly language source file containing two PUBLIC procedures called READKEY and ECHO which reads and echoes character in AL respectively.  Develop an ALP which uses READKEY and ECHO procedures each ten times. 
6.b.  Input the data from logic controller, compliment it and display the result on the LED's of the logic controller. 

7.a. Write an ALP with the following features. It contains a macro with one parameter LOC. The macro reads the keyboard and places the ascii code of the key read in LOC. Use the macro twice in your source program.  
7.b. Write an ALP to read status of 8 inputs from logic controller interface, and to display FF if any input is high else display 00.  

8.a. Using conditional assembly develop an ALP with following features. It uses an input value, an unsigned 16 bit, called X. If EQN1 is true then compute 3*X*X*X + 4*X + 5 and place the result in 32 bit memory. Otherwise compute 7*X-8 and place the result in 32 bit memory. 
8.b. Write an ALP to perform the following. Read the status of 3 inputs from logic controller interface. Assuming these inputs represent binary number X display 2*X.  

9.a. Write an ALP that implements binary search on 16 bit unsigned sorted integers.  
9.b. Write an ALP to interface 8x3 keyboard and for each key closure display the key pressed on the screen.  

10.a. Write an ALP to perform the following. Assume a look-up table of 16 entries. For each 4 bit key value use the look-up table and find the conversion and display it on the screen. Example, use a table to perform HEX to 7 SEGMENT conversion.   
10.b. Write an ALP to simulate elevator interface in the following way. Assume that initially the elevator is at the ground floor and all services are cleared. When a service request is detected the elevator moves to that floor. While it is traveling to that floor, if a service request is detected for any intermediate floor, it is also serviced. After servicing the floor for which the request was made, the elevator returns to the ground floor ignoring all other requests.  

11.a. Write an ALP to read 4 digit hexadecimal number from the keyboard and store the corresponding 16 bit binary value in word location.   
11.b. Write an ALP to display 4 digit BCD number on the 7 segment display interface.  

12.a. Write an ALP to compute the factorial of a positive integer n using recursive procedure. The 16 bit result can be stored in a memory location (chose n such that the result will not exceed 16 bits ). 
12.b. Write an ALP to scan 8x3 keypad interface for key closure. The row no. and the column number of the key pressed are to be displayed on the screen. 

13.a. Write an ALP to compute ncr using recursive procedure. 
13.b. Write an ALP to perform the following. Alternatively display two 4 digits messages on the display interface for suitable period of time. Ensure a flashing rate that makes it easy to read both the messages. 

14.a. Write an ALP that determines if a substring is present or not in a main string of characters. The result should be stored in a memory location with 1: present or 0: absent.  
14.b. Write an ALP to convert a 16 bit binary value to BCD and to display it on the display interface.  

15.a. Write an ALP to perform the following. Read the current time from the system, format it as HH:MM, and display it on the screen.   
15.b. Write an ALP to drive elevator interface in the following way. Assume that initially the elevator is at ground floor and all service request are cleared. When a service request is detected, the elevator moves to that floor. While it is traveling to that floor, all other service requests are ignored. After servicing that floor it scans for future requests for some time. If no request is detected within that time the elevator returns to the ground floor ignoring any further requests. On the other hand if a request is detected while it is scanning for requests, it moves to that floor again ignoring any intermediate requests made during the travel. If more than one request is detected at the same time a floor is selected arbitrarily.  

 

 

Download MASM for windows.