This repository contains System Programming assignments, implemented in Java.
Each program demonstrates key concepts in assembler design, macro processing, and lexical analysis, inspired by the classical problems in system software. Wrote this before vibe coding became a thing so I'll cherish this repository forever :')
- Location Counter (LC) processing
- Assembly code → Intermediate code
- Symbol Table (SYMTAB) generation
- Error checks:
- Invalid mnemonics
- Missing comma between operands
- Location Counter (LC) processing
- Assembly code → Intermediate code (IC)
- Literal Table generation
- Pool Table generation
- Location Counter (LC) processing
- Intermediate code → Machine code
- Macro expansion: final assembly code with macros expanded
- Generation and use of:
- MNT (Macro Name Table)
- MDT (Macro Definition Table)
- EVNTAB (Expansion Variable Name Table)
- EVTAB (Expansion Variable Table)
- APTAB (Argument Parameter Table)
- Lexical analysis of a C program
- Symbol table generation
Each assignment is self-contained within its folder (SP1/
, SP2/
, etc.).
To run any program:
- Open the
.java
file in your IDE (e.g., IntelliJ IDEA, Eclipse, VS Code). - Run the program.
- Provide the required input through the terminal when prompted.
- Assignments 4 and 5 use file handling. The respective input files are present in those folders.
- Sorry I forgot to modify the file paths, please remove my file paths in assignments 4 and 5 and add yours (please look through the entire code so you don't miss any line where I've specified a file path) :(
These assignments have been implemented with respect to the hypothetical assembly language described in the textbook
Systems Programming by D.M. Dhamdhere.