Pass-1 Assembler

24 Comments

C program for Pass-1 Assembler

C program for Pass-1 Assembler #include<iostream.h> #include<conio.h> #include<stdio.h> #include<stdlib.h> #include<string.h> int symi=0,lc=0,len=1,dc=0,start=0; struct pgm { char line[80]; } s[100]; struct symtab { char name[10]; int add; } sym[100]; void show(char* a,char* b,char* c) { printf("%8s %5s %6s \n",a,b,c); } void check(char s[]) { if(!strcmpi(s,"START")) { start=1; show("","START","1"); return; } if(!strcmpi(s,"END")) { show("","END","1"); return; } if(!strcmpi(s,"EQU")) […]