This is a program for two pass assembler. This program uses static input source program. Shortage of time did not allow us to go for dynamic input. Dynamic program will be published after some time. The static input source program is in code[][] array. Field 1: Label, Field 2: Opcode, Field 3: Operand1, Field 4: Operand2. Please do comment for any queries.
Two-Pass Assembler
#include<stdio.h>
#include<string.h>
#include<conio.h>
void main()
{
char *ptr;