Showing posts with label SPCC -System Programming and Compiler Construction. Show all posts
Showing posts with label SPCC -System Programming and Compiler Construction. Show all posts

Wednesday, April 13, 2011

Two Pass Assembler


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;