Sunteți pe pagina 1din 14

1/29/13

Home SEM 1 SEM 2

ENGINEERING LAB MANUALS: CS2308 -SYSTEM SOFTWARE LM Syllabus Anna university V Semester All Subjects CSE Syllabus 3RD SEM 4TH SEM 5TH SEM 6TH SEM 7TH SEM PROJECT TOPICS Anna university VII Semester All Subjects CSE Syllabus
ELECTRONICS AND COMMUNICATION ENGINEERING SYLLABUS:

Anna university lab manuals for all Engineering All Subjects affiliated with anna univeristy. This blog is mainly for Of Technology III Semestercolleges studentsECE Syllabus Anna university V Semester All Subjects ECE Syllabus Anna university VII Semester All Subjects ECE Syllabus ELECTRICAL AND ELECTRONICS ENGINEERING SYLLABUS: Question Bank Anna university Of Technology III Semester All Subjects EEE Anna SyllabusUniversity Updates Anna university V Semester All Subjects EEE Syllabus Anna University Syllabus Anna university VII Semester All Subjects EEE Syllabus INFORMATION TECHNOLOGY SYLLABUS: Anna university Of Technology III Semester All Subjects IT Syllabus Anna university V Semester All Subjects IT Syllabus Anna university VII Semester All Subjects IT Syllabus
Download Question Bank, 2 Marks with Answers

ENGINEERING LAB MANUALS

Search This Blog


Search

Labels
141351-Digital Lab (2) 141351-DIGITAL SYSTEM LAB (1) 141353-OOP LAB MANUL (40) Bio Medical (5) Computer Aided Design (3) CP II - Lab Manaul (17) CS1657 DB AND WEB TECH (1) CS2041 C# (1) CS2307- COMPUTER NETWORKS LAB (1) CS2308 -SYSTEM SOFTWARE LM (25) CS2401 - Computer Graphics (1) CS2405-COMPUTER GRAPHICS LAB (24) CS2406-Open Source Lab (4) Data Structure (1) DBMS (1) DBMS and WT (19) EC2306 -DIGITAL SIGNAL PROCESSING (12) English (1) GE2321 -COMMUNICATION LAB (4) IT2305 JAVA PROGRAMMING (14) IT2401- SOA (1) IT2402-MOBILE COMMUNICATION (1) Microcontroller (9) Microprocessor (20) Networks Lab (1) OOAD (1) Operating System (16) SEM 5 (1) SEM 6 (1) SEM 7 (1) SEM 8 (1) SOA LAB MANUAL (6)

MECHANICAL ENGINEERING SYLLABUS: Anna university Of Technology III Semester All Subjects IT Syllabus Anna university V Semester All Subjects IT Syllabus Anna university VII Semester All Subjects IT Syllabus TUTORIALS:

Total Pageviews

69,916
Current Affairs
Apple Google Microsoft Will Apple's New, Higher Power Forbes 128GB iPad Relieve Some Investor Pressure? sold more Already, Apple has than 120 million of its popular tablets. Yet, the timing of today's announcement is particularly intriguing. Less than a week ago, Apple revealed lackluster holiday iPhone sales, reinforcing anxiety among investors that the ... Related Articles Goldman Sachs and the Apple Fortune structured bond deal Screen Shot 2013-01-29 at 6.58.59 AM FORTUNE -- Last Tuesday, the day before Apple (AAPL) released its holiday quarter earnings and two days before the company lost $60 billion in market value, Goldman Sachs (GS) sold $30 million worth of so-called ... Apple Announces 128GB iPad Forbes Apple this morning announced a 128 GB of the fourth generation iPad twice the storage of the highest capacity previous version. The new high-capacity iPad goes on sale February 5, in both black and white. The device will be priced at $799 for WiFi ... Related Articles

PHOTO SHOP TUTORIALS FLASH TUTORIALS DREAM VIEWER Sunday, 25 September 2011
Sunday, 25 September 2011

Showing posts with label CS2308 -SYSTEM SOFTWARE LM. Show all posts

LIST OF EXPERIMENTS
Sl.No. 1 2 3 4 5 6 7 8 9 10 11 12 Name of the Experiment Implement A Symbol Table Implement Pass One Of A Two Pass Assembler Implement Pass Two Of A Two Pass Assembler Implement A Single Pass Assembler Page No. 3 9 14 19 25 32 36 39 43 48 55 65

Implement A Two Pass Macro Processor


Implement A Single Pass Macro Processor Implement An Absolute Loader Implement A Relocating Loader Implement Pass One Of A Direct-Linking Loader Implement Pass Two Of A Direct-Linking Loader Simple Text Editor Symbol Table With Suitable Hashing
0 comments

Posted by Praveen at 06:34

Recommend this on Google

Labels: CS2308 -SYSTEM SOFTWARE LM

Implement A Symbol Table AIM: To write a C program to implement creation of symbol table. ALGORITHM:

engglabmanuals.blogspot.in/search/label/CS2308 -SYSTEM SOFTWARE LM

1/14

1/29/13
Samsung requests dismissal of ZDNet Apple appeal in Japanese court Within the original ruling, the Japanese court decided that Samsung's Galaxy S, Galaxy Tab and Galaxy S II do not infringe on Apple-held patents which relate to the synchronization of music and video files with servers. Apple originally sought 100 ... Related Articles
pow ered by

ENGINEERING LAB MANUALS: CS2308 -SYSTEM SOFTWARE LM

Step 1: Start the program. Step 2: Get the choice from the user. Step 3: If the option is CREATE, get the input and if there is a SYMBOL, place it in the SYMBOL TABLE. Step 4: If the choice is SEARCH, check the SYMBOL TABLE and display the message appropriately. Step 5: If the choice is MODIFY, search for the label and change the value of input. Step 6: If the choice is DISPLAY, set a for loop and display the table with the given input. Step 7: Stop the program. SOURCE CODE: /* CREATION OF SYMBOL TABLE */ #include<stdio.h> #include<conio.h> #include<string.h> void create(); void search(); void modify(); void display(); struct symbol { char label[10], adddress[10], value[5]; }s[10]; struct instructions { char address[10],label[10],opcode[10],operand[10]; }t; int ch,n=0,i,flag=0; char a[10]; void main() { char a[10]; int opt; clrscr(); ch='y'; do { printf("\n Enter the choice\n"); printf("1.Create\n2.Search\n3.Modify\n4.Display\n5.Exit\n"); scanf("%d",&opt); switch(opt) { case 1: create(); break; case 2: search(); break; case 3: modify(); break; case 4: display() break;

VIVA QUESTIONS (1)

About Me
P RA V E E N V I EW M Y C O M P LET E P R O FI LE

Blog Archive
2011 (237) October (31) September (206) IMPLEMENTATION OF MEMORY MANAGEMENT SCHEME USING ... IMPLEMENTATION OF MEMORY MANAGEMENT SCHEME USING ... IMPLEMENTATION OF MEMORY MANAGEMENT SCHEME USING ... IMPLEMENTATION OF PRODUCER CONSUMER PROBLEMAIM: ... IMPLEMENTATION OF INTERPROCESS COMMUNICATION USIN... IMPLEMENTATION OF INTERPROCESS COMMUNICATION USIN... IMPLEMENTATION OF PRIORITY S... IMPLEMENTATION OF ROUND ROB... IMPLEMENTATION OF SJF SCHEDULING ... IMPLEMENTATION OF FCFS SCHEDULING AIM:To write a ... SIMULATION OF GREP COMMAND AIM: To implement th... SIMULATION OF LS COMMAND AIM:To write a C program... IMPLEMENTATION OF I/O SYSTEM CALLS[open(),read(),... TO DEMONSTRATE EXECLP ( ) FUNCTION AIM:To write a... IMPLEMENTATION OF

Popular Posts
CS2405-COMPUTER GRAPHICS VIVA CS2405-COMPUTER GRAPHICS LAB VIVA QUESTIONS Define Computer graphics. Computer graphics remains one of the most existing and rapidly g... COMPUTER NETWORKS LAB VIVA QUESTIONS CS2307- COMPUTER NETWORKS LAB VIVA QUESTIONS What are functions of different layers? Differentiate between TCP/IP Layers and OSI Laye... OOAD Lab manual Click Here For Downloading OOAD or Case Tool Lab manual. oops lab manual SYLLABUS 141353 OBJECT ORIENTED PROGRAMMING LAB 0 0 3 2 (Common to CSE & I... COMPUTER GRAPHICS LAB SUB CODE : CS2405 SUBJECT : COMPUTER GRAPHICS LAB INDEX S.NO TITLE OF THE EXPERIMENT ... PRESENTATION TOPICS Topics for Technical & Nontechnical Presentation Bluetooth Grid Computing Flash memory cards Fuel Cell Touch screen monitors Global... Complex Numbers with Operator Overloading and Type Conversion Complex Numbers with Operator Overloading and Type Conversion Aim: To write a C++

engglabmanuals.blogspot.in/search/label/CS2308 -SYSTEM SOFTWARE LM

2/14

1/29/13
program to implement complex number class with necessary... MATRIX MULTIPLICATION USING FRIEND FUNCTIONS MATRIX MULTIPLICATION USING FRIEND FUNCTIONS AIM: To write a program for matrix multiplication using friend functions using C++. ALGORITH... OPEN SOURCE 2 MARKS WITH ANSWERS Open Source Viva Questions 1. What are Gnome and KDE, and are they compatible? Gnome and KDE are two large desktop environments. Both si... Matrix class using default argument,static data members and friend function Matrix class using default argument,static data members and friend function Aim: To write a C++ program to perform matrix manipulation us...

ENGINEERING LAB MANUALS: CS2308 -SYSTEM SOFTWARE LM

Slideshow

Followers
Join this site
w ith Google Friend Connect

Members (5)

Already a member? Sign in

Yahoo News: Top Stories

case 5: exit(0); break; } } while(opt<5); getch(); } void create() { printf("\nEnter the Address, Label, Opcode, Operand\n"); scanf("%s%s%s%s",&t.address,&t.label,&t.opcode,&t.operand); if(strcmp(t.label,"_")!=0) { flag=0; for(i=0;i<=n:i++) { if(strcmp(s[i].label,t.label)==0) { flag=1; break; } } if(flag==0) { strcpy(s[n].address,t.address); strcpy(s[n].label,t.label); strcpy(s[n].value,t.operand); n++; } else { printf("\nThe Label is already there"); } } } void search() { printf("\nEnter the Label"); scnaf("%s",&a); for(i=0;i<=n;i++) { if(strcmp(a,s[i].label)==0) { flag=1; break; } } if(flag==1) { printf("\t\tLABEL\tADDRESS\tVALUE\t\n"); printf("\t\t%s\t%s\t%s\n",s[i].label,s[i].address,s[i].value); } else { printf("Not Found");

LINUX SYSTEM CALL[stat()]AIM: T... IMPLMENTATION OF LINUX SYSTEM CALLS IMPLEMENTATION OF LINUX SYSTEM CALLS OOAD Lab manual DBMS for M.E Students SORTING TECHNIQUES Aim: To write a program in ... COUNT THE NUMBER OF CHARACTERS Aim: To wr... ALLOCATE SPACE FOR A STRING DYNAMICALLY ANDPRINT ... ALLOCATE MEMORY FOR ARRAY USING CALLOC Aim: To w... COPY ONE FILE TO ANOTHER FILE Aim To write ... SORTING THE CONTENT OF THE FILE AimTo write a she... CALCULATING TELEPHONE BILL Aim:To write a shell s... GIVEN STRING IS PALINDROME OR NOT Aim:To write a ... CALCULATING FACTORIAL OF A GIVEN NUMBER Aim :To w... ... GENERATING FIBONACCI SERIES Aim: To write a she... GENERATING ARMSTRONG NUMBERS <!--[if !supportLin... CHECK POSITIVE OR NEGATIVE NUMBER Aim:To write a... SIMPLE SHELL PROGRAMSCHECKIN G OF EVEN OR ODD NUMB... UNIX EDITOR UNIX system starts a special ve...

engglabmanuals.blogspot.in/search/label/CS2308 -SYSTEM SOFTWARE LM

3/14

1/29/13
Add South Park Characters

ENGINEERING LAB MANUALS: CS2308 -SYSTEM SOFTWARE LM

Yahoo! News - Top Stories Policeman protecting Pakistani polio team killed PESHAWAR, Pak istan (AP) Gunmen riding on a motorcycle shot and k illed a police officer protecting polio work ers during a U.N.back ed vaccination campaign in northwestern Pak istan on Tuesday, the police said. Philips loss shrinks in Q4;

Amazon Deals

} } void modify() { char a[10]; flag=0; printf("\nEnter the label\n"); scanf("%s",&a); for(i=0;i<=n;i++) { if(strcmp(a,s[i].label)==0) { flag=1; break; } } if(flag==0) { printf("\nError"); } else { printf("\nEnter the Address, Value\n"); scanf("%s%s",&s[i].address,&s[i].value); } } void display() { printf("\t\tLABEL\tADDRESS\tVALUE\t\t\n"); for(i=0;i<=n;i++) { printf("\t\t%s\t%s\t%s\t\t\n",s[i].label,s[i].address,s[i].value); } }

BASIC SHELL COMMANDS ls --lists your files ls... Traffic Light KEYBOARD CONTROLAimTo write an assembly language ... BIOS/DOS CALLS FILE MANIPULATIONAIM:T o open a f... BIOS /DOS CALL, KEYBOARD, CONTROL, DISPLAY FILE M... Stepper Motor 8 BIT DIVISIONAIM: To write an assembl... 8 BIT MULTIPLICATION 8 BIT SUBTRACTION 16 BIT ADDITION 8251 KEYBOARD AND DISPLAY INTERFACE - 8279 8253 INTERFACE Peripheral - 8255 STRING MANIPULATION SORTING MATRIX MULTIPLICATION USING 8085 BINARY TO ASCII ASCII TO BINARY BCD CODE TO BINARY

OUTPUT:

CODE CONVERSION 16-BIT DIVISION

Enter the choice 1.Create 2.Search 3.Modify 4.Display 5.Exit 1 Enter the Address, Label, Opcode, Operand 1000 COPY START 4890 Enter the choice 1.Create 2.Search 3.Modify 4.Display
engglabmanuals.blogspot.in/search/label/CS2308 -SYSTEM SOFTWARE LM

16-BIT MULTIPLICATION 16-BIT SUBTRACTION 16-BIT ARITHMETIC OPERATION 1.d. 8-BIT DIVISION. 1.c. 8-BIT MULTIPLICATION. 1.b. 8-BIT SUBTRACTION 8 BIT ARITHMETIC OPERATION MULTI THREADING JAVAI/O EXCEPTION HANDLING MULTIPLE INHERITANCE

4/14

1/29/13

ENGINEERING LAB MANUALS: CS2308 -SYSTEM SOFTWARE LM

5.Exit 1 Enter the Address, Label, Opcode, Operand 2000 COPY START 2345 The Label is already there Enter the choice 1.Create 2.Search 3.Modify 4.Display 5.Exit 1 Enter the Address, Label, Opcode, Operand 2000 CLOOP LDA 9000 Enter the choice 1.Create 2.Search 3.Modify 4.Display 5.Exit 2 Enter the Label COPY LABEL ADDRESS VALUE COPY 1000 4890 Enter the choice 1.Create 2.Search 3.Modify 4.Display 5.Exit 3 Enter the label CLOOP Enter the Address, Value 2003 5000 Enter the choice 1.Create 2.Search 3.Modify 4.Display 5.Exit 4 LABEL ADDRESS VALUE COPY 1000 4890 CLOOP 2003 5000

SINGLE INHERITANCE INTERFACES DESIGNING PACKAGES Aim: To write the j... SIMPLE CLASS DESIGN IN JAVA LIST OF EXPERIMENTS Sl.No. Name of t... Imple... PA... PASS TWO ... ... TWO... SING... ... ... PASS ONE OF A D... PASS TWO OF A ... ... Hierarchal inheritance with virtual function and... Virtual base class Aim:To write a C++ program t... Write into the file.Aim: To write a C++ program t... Lab manuals Grams Staining Technique LACTOPHENOL COTTON BLUE STAINING HAEMOGLOBIN ESTIMATION STAINING OF BLOOD FILMS (Differential Counting) COLLECTION OF BLOOD SPECIMEN FROM PATIENTS Experiment -2 Aim Practice Programming on M...

engglabmanuals.blogspot.in/search/label/CS2308 -SYSTEM SOFTWARE LM

5/14

1/29/13

ENGINEERING LAB MANUALS: CS2308 -SYSTEM SOFTWARE LM

Enter the choice 1.Create 2.Search 3.Modify 4.Display 5.Exit 5

case study Experiment order DBMS LAB QUESTIONS DATA BASE CONNECTIVITY USING JSP STUDENT INFORMATION SYSTEM USING ASP JDBC CONNECTIVITY

Result
Thus above program executed and output verified.
Posted by Praveen at 06:34 0 comments

Recommend this on Google

Labels: CS2308 -SYSTEM SOFTWARE LM

DATE/TIME INFORMATION SERVER AND CLIENT USING UDP... TCP/IP

PASS ONE OF TWO PASS ASSEMBLER

WORK SHEET EXAMPLES APPLICATION EMPLOYEE INFORMATION SYSTEM JAVA TO DATABASE CONNECTIVITY USING JDBC NORMALIZATION DESIGN OF DATABASE USING ER MODELING AND NORMALIZ... DCL STATEMENTS FUNCTIONS PACKAGES TRIGGERS VIEWS SEQUENCES INDEXES AND SYNONMS DDL AND DML GROUP FUNCTIONS AND SUBQUERIES GROUP FUNCTIONS AND SUBQUERIE sql functions sql functions IIR filter cicular convolution

AIM: To write a C program to implement the operation of pass1 of two pass assembler. ALGORITHM: Step 1: Start the program. Step 2: Create a structure to declare the input variables and another structure for output variables. Step 3: Create a structure for symbol table declaration. Step 4: In the main function, get the label, operand and opcode. Step 5: Compare the opcode with START and set the location counter. Step 6: Compare the output address with the location counter, if true copy the inputs to the output. Step 7: Using while compare opcode with END and if its not true compare the labels. Step 8: Set the flag value and equals the symbol table address with location counter value. Step 9: Compare the opcode with WORD if true add 3 to location counter. Step 10: If the opcode is BYTE then find the length of operand and equate to location counter. Step 11: If it is RESW, then add 3 into operand value to location counter. Step 12: If it is RESB, then equate the value of operand value to location counter. Step 13: Print the table. Step 14: Stop the program. SOURCE CODE: /* PASS ONE OF TWO PASS ASSEMBLER */ #include<stdio.h> #include<conio.h> struct input { char label[10],opcode[10],operand[10]; }in[20]; struct output { char label[10],opcode[10],operand[10]; int address;
engglabmanuals.blogspot.in/search/label/CS2308 -SYSTEM SOFTWARE LM

Hamming windown FIR filter frequency domain Band limited input sequence down sampling samplar casual IIR filter IIR filter Butterworth filter LINEAR CONVOLUTION

6/14

1/29/13

ENGINEERING LAB MANUALS: CS2308 -SYSTEM SOFTWARE LM

}op[20]; struct symbol { char label[10],value[10]; int address; }sym[20]; int s=1,o=1,i=1,x,flag=0; int locctr,a,temp,l,t; char loc[10]; void main() { clrscr(); printf("\nEnter the label opcode and operand: "); scanf("%s%s%s",in[i].label,in[i].opcode,in[i].operand); if(strcmp(in[i].opcode,"START")==0) { locctr=atoi(in[i].operand,10); } else { locctr=0; } op[o].address=locctr; strcpy(op[o].label,in[i].label); strcpy(op[o].opcode,in[i].opcode); strcpy(op[o].operand,in[i].operand); o++; i++; temp=locctr; printf("\nEnter the label opcode and operand: "); scanf("%s%s%s",in[i].label,in[i].opcode,in[i].operand); while(strcmp(in[i].opcode,"END")!=0) { if(strcmp(in[i].label,"-")!=0) { for(x=1;x<=s;x++) { if(strcmp(in[i].label,sym[s].label)==0) { flag=1; break; } } if(flag==0) { strcpy(sym[s].label,in[i].label); sym[s].address=locctr; } else { printf("\nAlready exists"); } } if(strcmp(in[i].opcode,"WORD")==0) { strcpy(sym[s].value,in[i].operand);
engglabmanuals.blogspot.in/search/label/CS2308 -SYSTEM SOFTWARE LM

UNIX COMMANDS MANUAL OPEN SOURCE 2 MARKS WITH ANSWERS VIVA RGB TO HSV COLOR MODELS WINDOWING TO VIEWPORT MAPPING BRESENHAMS CIRCLE DRAWING ALGORITHM BRESENHAMS LINE DRAWING ALGORITHM #include "s... BRESENHAMS ELLIPSE DRAWING ALGORITHM 3 D TRANS BRESENHAMS CIRCLE ALGORITHM 2D TRANSFORMATION BRESENHAMS LINE ALGORITHM OUTPUT PRIMITIVES COMPUTER NETWORKS LAB VIVA QUESTIONS LOGIC GATES SYLLABUS Read the content from the file. INHERITANCE AND RTTI STACK IMPLEMENTATION SORTING Insertion sort using class template Bubble sort using class template Function template TYPE COVNERSION Binary operator overloading Unary operator overloading Stream operator overloading Overloading using new and delete operator Matrix using copy constructor and assignment opera... Constructor overloading

7/14

1/29/13

ENGINEERING LAB MANUALS: CS2308 -SYSTEM SOFTWARE LM

locctr=locctr+3; s++; } else if(strcmp(in[i].opcode,"BYTE")==0) { strcpy(sym[s].value,in[i].operand); l=strlen(in[i].operand); locctr=locctr+l; s++; } else if(strcmp(in[i].opcode,"RESW")==0) { locctr=locctr+(3*atoi(in[i].operand)); s++; } else if(strcmp(in[i].opcode,"RESB")==0) { locctr=atoi(in[i].operand); s++; } else { locctr=locctr+3; } op[o].address=temp; strcpy(op[o].label,in[i].label); strcpy(op[o].opcode,in[i].opcode); strcpy(op[o].operand,in[i].operand); o++; i++; temp=locctr; printf("\nEnter the label opcode and operand: "); scanf("%s%s%s",in[i].label,in[i].opcode,in[i].operand); } printf("\n\n\t\t\tINPUT PROGRAM\n"); printf("\nLABEL\tOPCODE\tOPERAND"); for(l=1;l<=i;l++) { printf("\n\n%s",in[l].label); printf("\t%s",in[l].opcode); printf("\t%s",in[l].operand); } printf("\n\n\t\t\tOUTPUT PROGRAM"); printf("\n\nADDRESS\tLABEL\tOPCODE\tOPERAND"); for(l=1;l<o;l++) { printf("\n\n%d",op[l].address); printf("\t %s",op[l].label); printf("\t %s",op[l].opcode); printf("\t %s",op[l].operand); } printf("\n\n\t\tSYMBOL TABLE"); printf("\n\nADDRESS\tLABEL\tVALUE"); for(l=1;l<=s;l++) { printf("\n\n%d",sym[l].address);
engglabmanuals.blogspot.in/search/label/CS2308 -SYSTEM SOFTWARE LM

Complex number using object as argument Matrix class using default argument,static data me... Function overloading Pointer to data member Student details using classes and object EX 7 EX 6 EX 4 ALGO EX 3 EX 2 EX 1 VIVA SYMBOL TABLE using hashing SIMPLE TEXT EDITOR PASS TWO OF DIRECT LINKING LOADER PASS ONE OF DIRECT LINKING LOADER RELOCATING LOADER ABSOLUTE LOADER SINGLE PASS MACRO PROCESSOR SINGLE PASS ASSEMBLER EX 3 Experiment LAB MANUAL PRESENTATION TOPICS GD TOPICS FIRST AND SECOND SEM ENGLISH LAB MOBILE COMMUNICATION SOA QB CS2041 C# And .Net Framework AB CS2401 - Question bank CS2405-COMPUTER GRAPHICS VIVA SOA VIVA QUESTIONS Testing the Composite Application CREATION OF A BPEL MODULE AND A COMPOSITE APPLICAT... CREATION OF A WEB

8/14

1/29/13

ENGINEERING LAB MANUALS: CS2308 -SYSTEM SOFTWARE LM

printf("\t%s",sym[l].label); printf("\t%s",sym[l].value); } getch(); } OUTPUT: Enter the label opcode and operand: COPY START 1000 Enter the label opcode and operand: - ADD Enter the label opcode and operand: - SUB ONE TWO 1 2

SERVICE WITH DATABASE CONNECTIVI... CREATION OF WEB SERVICE CLIENT CREATION OF ADDITION WEB SERVICE Creating a Composite Application Project 141351-DIGITAL SYSTEM LABORATORY update shortly update shortly update shortly update shortly CLICK HERE For Downloading Network Lab Manual CLICK HERE For Downloading Data Structure Lab Man... English Syllabus

Enter the label opcode and operand: ONE WORD Enter the label opcode and operand: TWO WORD Enter the label opcode and operand: - END INPUT PROGRAM LABEL OPCODE OPERAND COPY ONE TWO START 1000 ONE TWO 1 2

1000

ADD SUB

CLICK HERE For Downloading Operating System LAB f...

WORD WORD

END

1000 OUTPUT PROGRAM

ADDRESS LABEL OPCODE OPERAND 1000 1000 1003 1006 1009 COPY ONE TWO START 1000 ONE TWO 1 2

ADD SUB

WORD WORD

SYMBOL TABLE ADDRESS LABEL VALUE 1006 1009 ONE TWO 1 2


9/14

engglabmanuals.blogspot.in/search/label/CS2308 -SYSTEM SOFTWARE LM

1/29/13

ENGINEERING LAB MANUALS: CS2308 -SYSTEM SOFTWARE LM

Result
Thus above program executed and output verified.
Posted by Praveen at 06:33 0 comments

Recommend this on Google

Labels: CS2308 -SYSTEM SOFTWARE LM

PASS TWO OF TWO PASS ASSEMBLER

AIM: To write a c program to perform pass 2 of two pass assembler. ALGORITHM: Step 1: Start the program. Step 2: Create structure for input, symtab, optab, final table. Step 3: In the main function, assign values for instructions. Step 4: Get the input from the user and check if OPCODE=START then begin assembler. Step 5: Calculate object code for input. Step 6: Display the output in the table format. Step 7: Stop the program. SOURCE CODE: /* PASS TWO OF TWO PASS ASSEMBLER */ #include<stdio.h> #include<conio.h> #include<string.h> struct input { char label[10],opcode[10],operand[10],address[20]; }in[20]; struct optab { char opcode[10],mnemonics[10]; }op[20]; struct symbol { char address[10],label[10],value[10]; }sym[20]; struct finaltable { char address[10],opcode[10],operand[10]; }fin[10]; void main() { int i,k,o,s,f,flag,x,n,y; clrscr(); o=1; strcpy(op[1].mnemonics,"ADD"); strcpy(op[1].opcode,"10"); strcpy(op[2].mnemonics,"SUB"); strcpy(op[2].opcode,"20"); strcpy(op[3].mnemonics,"MUL"); strcpy(op[3].opcode,"30"); strcpy(op[4].mnemonics,"DIV"); strcpy(op[4].opcode,"40");
engglabmanuals.blogspot.in/search/label/CS2308 -SYSTEM SOFTWARE LM 10/14

1/29/13

ENGINEERING LAB MANUALS: CS2308 -SYSTEM SOFTWARE LM

strcpy(op[5].mnemonics,"LDA"); strcpy(op[5].opcode,"50"); o=5; printf("\nEnter the number of entries in the symbol table:\t"); scanf("%d",&n); printf("\nAddress\tLabel\tValue\n"); for(s=1;s<=n;s++) scanf("%s\t%s\t%s",sym[s].address,sym[s].label,sym[s].value); i=1; s=1;k=1; printf("\nEnter the address:"); scanf("%s",in[i].address); printf("\nEnter the label:"); scanf("%s",in[i].label); printf("\nEnter the opcode:"); scanf("%s",in[i].opcode); printf("\nEnter the operand:"); scanf("%s",in[i].operand); while(strcmp(in[i].opcode,"END")!=0) { f=0; flag=0; for(x=1;x<=o;x++) { if(strcmp(in[i].opcode,op[x].mnemonics)==0) { flag=1; break; } } if(flag==1) { strcpy(fin[k].opcode,op[x].opcode); strcpy(fin[k].address,in[i].address); for(y=1;y<=n;y++) { if(strcmp(in[i].operand,sym[y].label)==0) { f=1; break; } else { f=0; } } if(f==1) strcat(fin[k].operand,sym[y].address); else if(f==0) printf("\nSymbol Table Entry is Wong"); } else if(strcmp(in[i].opcode,"WORD")==0||strcmp(in[i].opcode,"BYTE")==0 ) strcpy(fin[k].opcode,in[i].operand); else
engglabmanuals.blogspot.in/search/label/CS2308 -SYSTEM SOFTWARE LM 11/14

1/29/13

ENGINEERING LAB MANUALS: CS2308 -SYSTEM SOFTWARE LM

if(strcmp(in[i].opcode,"RESW")==0||strcmp(in[i].opcode,"RESB")==0 ) strcpy(fin[k].opcode,""); strcpy(fin[k].address,in[i].address); i++; k++; printf("\nEnter the address:"); scanf("%s",in[i].address); printf("\nEnter the label:"); scanf("%s",in[i].label); printf("\nEnter the opcode:"); scanf("%s",in[i].opcode); printf("\nEnter the operand:"); scanf("%s",in[i].operand); } printf("\n\nInput Program"); printf("\nADDRESS\tLABEL\tOPCODE\tOPERAND"); for(f=1;f<=i;f++) printf("\n%s\t%s\t%s\t%s",in[f].address,in[f].label,in[i].opcode,in[f].op erand); printf("\nSYMBOL TABLE"); printf("\nLABEL\tADDRESS\tVALUE"); for(f=1;f<=n;f++) printf("\n%s\t%s\t%s",sym[f].label,sym[f].address,sym[f].value); printf("\n\nFINAL TABLE"); printf("\nADDRESS\tOBJECTCODE"); for(f=1;f<=k;f++) { printf("\n%s\t%s%s",fin[f].address,fin[f].opcode,fin[f].operand); } getch(); }

OUTPUT: Enter the number of entries in the symbol table: Address Label Value 1006 ONE 1 1009 TWO 2 Enter the address:1000 Enter the label:COPY Enter the opcode:START Enter the operand:1000 Enter the address:1000 Enter the label:2

engglabmanuals.blogspot.in/search/label/CS2308 -SYSTEM SOFTWARE LM

12/14

1/29/13

ENGINEERING LAB MANUALS: CS2308 -SYSTEM SOFTWARE LM

Enter the opcode:ADD Enter the operand:ONE Enter the address:1003 Enter the label:Enter the opcode:ADD Enter the operand:TWO Enter the address:1006 Enter the label:ONE Enter the opcode:WORD Enter the operand:1 Enter the address:1009 Enter the label:TWO Enter the opcode:WORD Enter the operand:2 Enter the address:Enter the label:Enter the opcode:END Enter the operand:-

Input Program ADDRESS LABEL OPCODE OPERAND 1000 COPY END 1000 1000 END ONE 1003 END TWO 1006 ONE END 1 1009 TWO END 2 END SYMBOL TABLE LABEL ADDRESS VALUE ONE 1006 1 TWO 1009 2 FINAL TABLE ADDRESS OBJECTCODE 1000 1000 101006 1003 101009 1006 1 1009 2
engglabmanuals.blogspot.in/search/label/CS2308 -SYSTEM SOFTWARE LM 13/14

1/29/13

ENGINEERING LAB MANUALS: CS2308 -SYSTEM SOFTWARE LM

Result
Thus above program executed and output verified.
Posted by Praveen at 06:32 0 comments

Recommend this on Google

Labels: CS2308 -SYSTEM SOFTWARE LM

Home

Older Posts

Copyright (c) 2011 ENGINEERING LAB MANUALS. Designed for Blogger Templates - Blogger Blog Templates, Web Site Design Chicago, web hosting, Advisor Price

engglabmanuals.blogspot.in/search/label/CS2308 -SYSTEM SOFTWARE LM

14/14

S-ar putea să vă placă și