Saturday 17 September 2011

LAB MANUAL


Syllabus
CS2308                      SYSTEM SOFTWARE                LAB 0 0 3 2
                                             (Using C)
1. Implement a symbol table with functions to create, insert, modify, search,and display.
2.Implement pass one of a two pass assembler.
3 Implement pass two of a two pass assembler.
4.Implement a single pass assembler.
5.Implement a two pass macro processor
6. Implement a single pass macro processor.
7. Implement an absolute loader.
8. Implement a relocating loader.
9. Implement pass one of a direct-linking loader.
10. Implement pass two of a direct-linking loader.
11. Implement a simple text editor with features like insertion / deletion of a character, word, and sentence.
12. Implement a symbol table with suitable hashing


Ex.No: 01
SYMBOL TABLE
AIM:
To implement a Symbol table with functions to create, insert, modify, search and display in C language.
ALGORITHM:
1. Start the program
2. Define the structure of the symbol table
3. Enter the choice for performing the operations in the symbol table
4. If choice is 1, search symbol table for the symbol to be inserted. If the symbol is already present display
“Duplicate Symbol”, else insert symbol and corresponding address in the symbol table
5. If choice is 2, symbols present in the symbols table are displayed
6. If choice is 3, symbol to be deleted is searched in the symbol table, if found deletes else displays “Not
Found”.
7. If choice is 5, the symbol to be modified is searched in the symbol table. The label or address or both can
be modified.


output
1.create
2.insert
3.modify
4.search
5.display
enter ur choice1

enter the symbol name   a
enter the value         10

do u want to continue   y

enter the symbol name   b
enter the value         20

do u want to continue   n

1.create
2.insert
3.modify
4.search
5.display

enter ur choice   2
enter the symbol namec

enter the value 30

do u want to continue   n

1.create
2.insert
3.modify
4.search
5.display
enter ur choice5

contents
                the name is             a
                the value is            10
contents
                the name is             b
                the value is            20
contents
                the name is             c
                the value is            30
1.create
2.insert
3.modify
4.search
5.display
enter ur choice3
enter the symbol to modifyb
value to modify240

the value is modified
1.create
2.insert
3.modify
4.search
5.display
enter ur choice5
contents
                the name is             a
                the value is            10
contents
                the name is             b
                the value is            240
contents
                the name is             c
                the value is            30
1.create
2.insert
3.modify
4.search
5.display
enter ur choice 4

        enter the symbol                c

         the symbol is found
1.create
2.insert
3.modify
4.search
5.display
enter ur choice4
        enter the symbol                x
        the symbol is not found
1.create
2.insert
3.modify
4.search
5.display
enter ur choice 6


RESULT:
Thus the  Symbol table with functions to create, insert, modify, search and display  are implemented.