Assembly Programs
This page consist of Assembly Codes for Assignments of second year IT and Computer Engineering . All codes are tested and well formatted with output as well . If you find any error or misprint please inform by writing your comment below the post . You can also ask your Doubts by writing below this post .
How to Run these Programs :
How to Run these Programs :
For Running these program you should have installed Tasm on you computer . If you have not installed Tasm yet please install from Here .
Program for ASCII-Binary conversion
Program to Pack the Two Unpacked BCD Numbers
Program to Unpack the Packed BCD Number
Program for Operation on Strings Assembly Language
Count the Number of 1’s in a Register
Program to Add Two 8 Bit Numbers
Program to Multiply Two 8 Bit Numbers
Program to Multiply Two 8 Bit Numbers Successive Addition Method
Multiply Two 8 Bit Numbers using Add and Shift Method
Program to Add Two 16 Bit Numbers
Program to Subtract Two 16 Bit Numbers
Program to Multiply Two 16 Bit Numbers
Program to Add Two 32 Bit Numbers
Program to Subtract Two 32 Bit Numbers
Program for Simulating AAA Instruction
Program for Binary-Gray conversion
Program For Conversion of BCD to Hex
Program For Conversion of Hex to BCD
Program to Pack the Two Unpacked BCD Numbers
Program to Unpack the Packed BCD Number
Program for Operation on Strings Assembly Language
Count the Number of 1’s in a Register
Program to Add Two 8 Bit Numbers
Program to Multiply Two 8 Bit Numbers
Program to Multiply Two 8 Bit Numbers Successive Addition Method
Multiply Two 8 Bit Numbers using Add and Shift Method
Program to Add Two 16 Bit Numbers
Program to Subtract Two 16 Bit Numbers
Program to Multiply Two 16 Bit Numbers
Program to Add Two 32 Bit Numbers
Program to Subtract Two 32 Bit Numbers
Program for Simulating AAA Instruction
Program for Binary-Gray conversion
Program For Conversion of BCD to Hex
Program For Conversion of Hex to BCD
Data Structure and Files Program Codes
Data Structure and Files Program Codes
Download Data Structure and Files Program Codes from these Links. All these Data Structure and Files Program Codes are working and tested. If you find any of these codes not working Please comment on the Page, So that it can be corrected.
Download Data Structure and Files Program Codes
Program for Matrix operations with pointers. | Matrix operations with pointers |
Program for Hash Table Implementation | Hash Table Implementation |
Program for Operations on File | Operations on File |
Program for Hoffman’s Code Using C | Hoffman’s Code |
Program for Dijkstra Algorithm in C | Dijkstra Algorithm |
Program for Breadth and Depth First Search | Breadth and Depth First Search |
Program for Traversal of BFS and DFS | Traversal of BFS and DFS |
Program for Expression Tree in C | Expression Tree |
Program for Operations on Queue | Operations on Queue |
Program for Circular Link List | Circular Link List |
Data Structure and Files Program Codes Laboratory Syllabus
Queues
Concept of queues as ADT, Implementation of linear and circular queue using linked and Concept of multi queues, de queue and priority queue. Application of queues. Sequential organization.
Stack
Concept of stack as ADT, Implementation of stacks using linked and sequential organization ,Importance of stack in recursion, Importance of implicit and explicit stack. Concept of multi stacks, Application of stacks.
File organization
Hashing function and it’s characteristics,Concept of sequential, C Files and command line argument,simple Index file and direct access file , Primitive operations and implementation in C. Sequential file organization, direct file organization,Processing of sequential, Index-sequential and direct files. Hashing,Concept of collision resolution, linear probing, index sequential file organization and their implementation rehashing ,chaining with & without replacement.
Graphs
Graph as an ADT, Depth First Search and Breadth First Search. shortest path- Dijkstra’s algorithm Application of these algorithms and Algorithms for minimal spanning tree Representation of graphs using adjacency matrix, adjacency list, Prim’s and Kruskal’s .
Tree
Difference in linear and non-linear data structure, Trees and binary trees-concept and terminology.binary tree as an ADT. Algorithm for tree traversals (recursive and non recursive). Threaded binary tree as an ADT. Pre order, In order traversals of in order threaded binary search tree. Conversion of general tree to binary tree. Binary search trees, Concept of threaded binary tree.
Symbol Tables and Dynamic Trees
Basic concepts of hash tables, hash function, hashing methods, collision resolution, bucket hashing.
AVL Trees, Heap data structure its application in heap sort, Notion of Symbol Table,OBST, Huffman’s algorithm,
SE(IT) FDS (Fundamentals of Data structure) Practicals or Assignments
SE(IT) FDS (Fundamentals of Data structure) Practicals or Assignments
Below is the list of all Practicals of SE-IT FDS subject with Source code . Fundamentals of Data structure subjects is one of the compulsory subject in SE-IT semester -1 under Pune University and Mumbai University .
PROGRAM TO PERFORM VARIOUS OPERATIONS ON SETS
|
|
PROGRAM TO PERFORM VARIOUS OPERATIONS ON STRINGS
|
|
Write a program to perform VARIOUS OPERATION IN SIMPLE MATRIX
|
|
Database in C
|
|
Write a program to perform Double Link List
|
|
Write a program to perform Single Link List
|
|
Write a program to perform Sparse Matrix Operations in C
|
|
Program for Mobile user information
|
|
Program for Operations on a database without using pointers
|
|
Write a program to perform String operationswith pointers
|
|
Write a program to perform Set operations – Union,Difference
Intersection ,Symmetric Difference etc. |
|
Write a program to perform various string operations such as Copy, Length, Reversing, Palindrome, Concatenation.
|
|
Write a program to perform operations on matrices like addition,saddle point, magic square ,inverse & transpose .
|
Implement using Socket Programming (TCP/UDP) in Java
Implement using Socket Programming (TCP/UDP) in Java
Aim : Implement using Socket Programming (TCP/UDP) in C / C++ / JAVA.
a) Addition of digits of a given Number.
b) Perform String Operations. (Length, Compare, Concatenation, Palindrome, Substring)
c) Find the Factorial of a Number.
Source Code for Socket Programming :
Client Source Code :
package com.prac.prac; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.PrintStream; import java.net.ServerSocket; import java.net.Socket; public class client { public static void main(String[] args) { int port=5001; try { Socket clientSocket=new Socket("localhost",port); System.out.println("Client Started"); InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(isr); PrintStream toServer=new PrintStream(clientSocket.getOutputStream()); BufferedReader fromServer=new BufferedReader(new InputStreamReader(clientSocket.getInputStream())); String menu="SOCKET PROGRAMMING MENU\n1.FACTORIAL\n2.SUM OF DIGITS OF A NO\n3.String Operation\n4.EXIT\nENTER UR CHOICE"; int choice=-1; do { toServer.flush(); System.out.println(menu); choice=Integer.parseInt(br.readLine()); toServer.println(choice); toServer.flush(); switch(choice) { case 1: System.out.println("ENTER A NO:"); int no=Integer.parseInt(br.readLine()); toServer.println(no); int result=Integer.parseInt(fromServer.readLine()); System.out.println("FACTORIAL IS:"+result); break; case 2: System.out.println("ENTER A NO:"); no=Integer.parseInt(br.readLine()); toServer.println(no); result=Integer.parseInt(fromServer.readLine()); System.out.println("SUM OF EACH DIGITS IS:"+result); break; case 3: String stringmenu="STRING OPERATION MENU\n1.LENGTH\n2.COMPARE\n3.CONCATENATE\n4.IS STRING IS PALINDROME\n5.SUBSTRING\n6.EXIT\nENTER UR CHOICE"; int stringChoice; do { System.out.println(stringmenu); stringChoice=Integer.parseInt(br.readLine()); toServer.println(stringChoice); toServer.flush(); switch(stringChoice) { case 1: System.out.println("ENTER A String:"); String str=br.readLine(); toServer.println(str); result=Integer.parseInt(fromServer.readLine()); System.out.println("LENGTH IS:"+result); break; case 2: System.out.println("ENTER First String:"); String first_str=br.readLine(); toServer.println(first_str); System.out.println("ENTER Second String:"); String second_str=br.readLine(); toServer.println(second_str); String str_result=fromServer.readLine(); System.out.println(str_result); break; case 3: System.out.println("ENTER First String:"); first_str=br.readLine(); toServer.println(first_str); System.out.println("ENTER Second String:"); second_str=br.readLine(); toServer.println(second_str); str_result=fromServer.readLine(); System.out.println("CONCANATED STRING IS"+str_result); break; case 4: System.out.println("ENTER A String:"); str=br.readLine(); toServer.println(str); str_result=fromServer.readLine(); System.out.println("PALINDROME RESULT:"+str_result); break; case 5: System.out.println("ENTER First String:"); first_str=br.readLine(); toServer.println(first_str); System.out.println("ENTER Second(it is checkd as substring) String:"); second_str=br.readLine(); toServer.println(second_str); str_result=fromServer.readLine(); System.out.println("Substring Result:"+str_result); break; case 6: break; } }while(stringChoice!=6); break; case 4: break; default: System.out.println("INVALID CHOICE"); } }while(choice!=4); } catch (Exception e) { // TODO Auto-generated catch block } } }
Server Source Code :
package com.prac.prac; import java.io.*; import java.net.*; public class server { /** * @param args */ public static void main(String[] args) { int port=5001; try { ServerSocket serverSocket=new ServerSocket(port); System.out.println("SERVER WAITING"); Socket clientSocket=serverSocket.accept(); BufferedReader fromClient=new BufferedReader(new InputStreamReader(clientSocket.getInputStream())); PrintStream toClient=new PrintStream(clientSocket.getOutputStream()); while(true) { int choice=Integer.parseInt(fromClient.readLine()); System.out.print(choice); switch(choice) { case 1: int no=Integer.parseInt(fromClient.readLine()); int result=1; if (no!=0 && no!=1){ for(int i=2;i<=no;i++) result*=i; } toClient.flush(); toClient.println(result); break; case 2: no=Integer.parseInt(fromClient.readLine()); result=0; while(no!=0){ result+=no%10; no/=10; } toClient.flush(); toClient.println(result); break; case 3: int stringChoice; do{ stringChoice=Integer.parseInt(fromClient.readLine());; switch(stringChoice){ case 1: String first_str=fromClient.readLine(); result=first_str.length(); toClient.flush(); toClient.println(result); break; case 2: first_str=fromClient.readLine(); String second_str=fromClient.readLine(); result=first_str.compareTo(second_str); String str_result=""; if (result ==0) str_result="Both are equal"; else if (result<0) str_result=second_str+" is greater"; else str_result=first_str+" is greater"; toClient.flush(); toClient.println(str_result); break; case 3: first_str=fromClient.readLine(); second_str=fromClient.readLine(); result=first_str.compareTo(second_str); str_result=first_str+second_str; toClient.flush(); toClient.println(str_result); break; case 4: first_str=fromClient.readLine(); int i,j; for(i=0,j=first_str.length()-1;i<=j;i++,j--){ if(first_str.charAt(i)!=first_str.charAt(j)) break; } if (i<j) <br=""> str_result="NO"; else str_result="YES"; toClient.flush(); toClient.println(str_result); break; case 5: first_str=fromClient.readLine(); second_str=fromClient.readLine(); result=first_str.indexOf(second_str); if(result==-1) str_result="NO"; else str_result="YES"; toClient.flush(); toClient.println(str_result); break; case 6: break; } }while(stringChoice!=6); break; case 4: break; } } } catch (Exception e) { // TODO Auto-generated catch block } } }
Output of the Program Socket :
SERVER WAITING…..
Client Started
SOCKET PROGRAMMING MENU
1.FACTORIAL
2.SUM OF DIGITS OF A NO
3.String Operation
4.EXIT
ENTER UR CHOICE
1
ENTER A NO:
3
FACTORIAL IS:6
SOCKET PROGRAMMING MENU
1.FACTORIAL
2.SUM OF DIGITS OF A NO
3.String Operation
4.EXIT
ENTER UR CHOICE
Implement a Program for Feature Extraction in 2D Colour Images (any features like Colour, Texture etc.)
Implement a Program for Feature Extraction in 2D Colour Images (
features like Colour, Texture etc.)
Aim : To implement Program for Feature Extraction in 2D Colour Images .
Objective : To study Program for Feature Extraction in 2D Colour Images for features like ..Colour and Textures .
Given Feature Extraction source code is implemented using Java language . The input to the program is image file that is to be modified using program by changing colour .
Feature Extraction source code :
package com.prac.prac; import java.awt.*; import java.awt.image.BufferedImage; import java.io.*; import java.util.*; import javax.imageio.ImageIO; public class Exatraction { private static BufferedImage orignal,answer; public static void main(String[] args) throws IOException{ File orignal_f=new File("a.jpg"); orignal = ImageIO.read(orignal_f); answer=imageHistogram(orignal); writeImage("featureExtraction"); } private static void writeImage(String output) throws IOException { File file = new File(output+".jpg"); ImageIO.write(answer, "jpg", file); } private static int colorToRGB(int alpha, int red, int green, int blue) { int newPixel = 0; newPixel += alpha; newPixel = newPixel << 8; newPixel += red; newPixel = newPixel << 8; newPixel += green; newPixel = newPixel << 8; newPixel += blue; return newPixel; } public static BufferedImage imageHistogram(BufferedImage input) { BufferedImage redGraph = new BufferedImage(input.getWidth(),input.getHeight(),input.getType()); for(int i=0; i<input.getWidth(); i++) { for(int j=0; j<input.getHeight(); j++) { int alpha =new Color(input.getRGB (i, j)).getAlpha(); int red = new Color(input.getRGB (i, j)).getRed(); int green = new Color(input.getRGB (i, j)).getGreen(); int blue = new Color(input.getRGB (i, j)).getBlue(); redGraph.setRGB(i, j, colorToRGB(alpha, 0,0,blue)); } } return redGraph; } }
Input to the Program :
Output from the Program :