Contains the solutions for the System Software lab.
Questions are:
PART-A Implement the following using C/C++ for the SIC Machine:
- Develop pass-1 of two-pass assembler.
- Develop pass-2 of two-pass assembler.
- Develop absolute loader.
- Develop relocating loader using bit mask.
- Develop one-pass macroprocessor.
PART-B LEX Exercises:
- Develop a lex program to count the number of characters, words, spaces and lines in a given input file.
- Develop a lex program to count the number of comment lines in a given C program.
- Develop a lex program to recognize a valid arithmetic expression and identify the identifiers and operators present.
- Develop a lex Program to recognize and count the number of identifiers in a given input file.
YACC Exercises:
- Develop a yacc program to recognize a valid arithmetic expression that uses operators + ,- ,* and /.
- Develop a yacc program to recognize a valid variable, which starts with a letter, followed by any number of letters or digits.
- Develop a yacc program to evaluate an arithmetic expression involving operators +,-,* and /.
- Develop a yacc program to recognize the strings of the form a^mb^n , where m>=0,n>=0.