(d) To check whether a string is palindrome or not. data segment inst db 20 dup(0) mes1 db 0Ah,0Dh,"insert the string:$" mes2 db 0Ah,0Dh,"it is a palindrome:$" mes3 db 0Ah,0Dh,"it is not a palindrome:$" data ends code segment assume cs:code,ds:data
mov ah,01h int 21h cmp al,0Dh jz down mov[inst+bx],al inc bx jmp up
mov di,00h dec bx
mov al,[inst+bx] cmp al,[inst+di] jne fail inc di dec bx jnz check jmp finish
mov ah,09h lea dx,mes3 int 21h jmp term
mov ah,09h lea dx,mes2 int 21h
mov ah,4Ch int 21h
code ends end start
Department of Electronics & Communication
Sri Siddhartha Institute of Technology
11) An ALP to multiply two matrices . data segment ar1 db 1h,2h,-3h ar2 db 4h,5h,6h ar3 db 2h,-1h,3h bc1 db 2h,4h,-4h bc2 db 3h,-2h,5h bc3 db 1h,5h,2h c db 9 dup (?) l2 db (?) l1 db (?) data ends code segment assume cs:code,ds:data
Instructions: 1.Experiments on micro controller can be carried out using any 8-bit/16-bit micro controller kit. 2.A student should be given only one question either from part-1 or f rom part-II for the examination. 3.For each batch in examination, around 60% of the questions should be from part-I and around 40% of the questions should be from part-II. 4.No change of experiment/question is permitted in the examination.
1.Write an ALP to transfer a given block of data (byte/word) from source memory block to destination memory block with or without overlapping. 2. Write an ALP to transfer given source string to destination using string instructions. 3.Write an ALP to perform the following string operations: a) Reverse a string, search/delete a word from a string b) Check if the given string is palindrome or not. 4.Write an ALP to add 16 bytes/words and find the average and display. 5.write an ALP to multiply two 32 bit numbers and display. 6.Write an ALP to multiply two ASCII byte numbers and display. 7.Develop and execute an ALP to find GCF/LCM of two 16-bit unsigned integers. 8.Develop and execute an ALP to sort a given set of 16-bit unsigned integers into ascending order using insertion/bubble sort algorithm. 9.Write an ALP to generate 10 fibonacci numbers, Read initial values via keyboard. 10.Write an Alp to generate prime numbers between 1 to 50 BCD. 11.Write an ALP to multiply two matrices &display. 12.Write an ALP to find a) Sum of principal diagonal elements (trace of a matrix) b) Norms of the matrix (sum of the squares of the principal diagonal elements) 13.Develop and execute an ALP that implements binary search algorithm. Assume that the data consist of sorted 16-bit integers. Search key is also a 16-bit unsigned integer. 14.Interface a logic controller via 8255 using I/O cards and perform the following operations. Read all the 8 inputs from the logic controller. Complement and display on the outputs.
15.Write an Alp to transfer a block of data from a given source to destination using 8051/equivalent. 16.Writ an ALP to find average of 10 data bytes in a memory using 8051/equivalent. 17.Write an ALP to multiply 16bit by 8-bit data using micro controller. 18 Write an ALP to generate 10 fibonacci numbers using 8051/equivalent. 19.Interface a printer to 8051/equivalent to operate in a) Handshake mode b) Interrupt driven mode 20.Develop and execute an ALP to find GCF/LCM of two 8-bit numbers using 8051/equivalent. 21.Write an ALP to add/subtract two multibyte numbers using micro controller. 22.Write an ALP to s earch a given key element from an array of integers using 8051/equivalent. 23.Write an ALP to sort an array using bubble sort. Display the sorted array. 24.Write an ALP to interchange two blocks of data residing at memory using 8051/equivalent.