diff --git a/Assembler/fig2_1.asm b/Assembler/fig2_1.asm
new file mode 100644
index 0000000..b08e3ba
--- /dev/null
+++ b/Assembler/fig2_1.asm
@@ -0,0 +1,56 @@
+.
+. Modified from figure 2.1 in the textbook
+. input device : DEV04
+. output device: DEV05
+.
+COPY START 1000
+FIRST STL RETADR
+CLOOP JSUB RDREC
+ LDA LENGTH
+ COMP ZERO
+ JEQ ENDFIL
+ JSUB WRREC
+ J CLOOP
+ENDFIL LDA EOF
+ STA BUFFER
+ LDA THREE
+ STA LENGTH
+ JSUB WRREC
+ LDL RETADR
+ RSUB
+EOF BYTE C'EOF'
+THREE WORD 3
+ZERO WORD 0
+RETADR RESW 1
+LENGTH RESW 1
+BUFFER RESB 4096
+.
+. SUBROUTINE TO READ RECORD INTO BUFFER
+.
+RDREC LDX ZERO
+ LDA ZERO
+RLOOP TD INPUT
+ JEQ RLOOP
+ RD INPUT
+ COMP ZERO
+ JEQ EXIT
+ STCH BUFFER
+ TIX MAXLEN
+ JLT RLOOP
+EXIT STX LENGTH
+ RSUB
+INPUT BYTE X'04'
+MAXLEN WORD 4096
+.
+. SUBROUTINE TO WRITE RECORD FROM BUFFER
+.
+WRREC LDX ZERO
+WLOOP TD OUTPUT
+ JEQ WLOOP
+ LDCH BUFFER
+ WD OUTPUT
+ TIX LENGTH
+ JLT WLOOP
+ RSUB
+OUTPUT BYTE X'05'
+ END FIRST
diff --git a/Assembler/symbol_table.py b/Assembler/symbol_table.py
new file mode 100644
index 0000000..3bad954
--- /dev/null
+++ b/Assembler/symbol_table.py
@@ -0,0 +1,24 @@
+file = open('fig2_1.asm')
+instructions, symbols, symbol_table = [],{},{}
+for line in file.readlines():
+ if line[0]!='.':
+ line = line.replace('\n','').split(' ')
+ instructions.append(list(filter(lambda x : x!='', line)))
+ if len(instructions[-1]) == 3: symbols[instructions[-1][0]] = False
+variable = {'WORD':3,'BYTE':1}
+buffer = {'RESB':1,'RESW':3}
+for instruction in instructions:
+ if len(instruction) == 1:continue
+ elif len(instruction) == 2:
+ if symbols[instruction[1]]:continue
+ else:symbol_table[instruction[1]] = [instruction[1],None,None]
+ else:
+ if symbols[instruction[0]]:continue
+ else:
+ if instruction[1] in variable.keys(): symbol_table[instruction[0]] = [instruction[0],variable[instruction[1]],instruction[2]]
+ elif instruction[1] in buffer.keys(): symbol_table[instruction[0]] = [instruction[0],buffer[instruction[1]]*int(instruction[2]),'--']
+ else: symbol_table[instruction[0]] = [instruction[0],3,'--']
+ symbols[instruction[0]] = True
+ if instruction[2] in symbols.keys() and symbols[instruction[2]]==False: symbol_table[instruction[2]] = [instruction[2],None,None]
+for symbol in symbol_table.values():
+ print("{0}".format(symbol[0]).ljust(10),"{0}".format(symbol[1]).ljust(5),"{0}".format(symbol[2]).ljust(5))
diff --git a/ICG/infix.py b/ICG/infix.py
new file mode 100644
index 0000000..06796c9
--- /dev/null
+++ b/ICG/infix.py
@@ -0,0 +1,42 @@
+infix = input("Enter infix expression : ").replace(' ','')
+result = input("Enter resultant variable : ")
+temp,string,operators = {},[],['+','-','*','/']
+count,cp = 1,0
+
+for i in range(len(infix)):
+ if infix[i] in operators:
+ string.append(infix[cp:i])
+ string.append(infix[i])
+ cp = i+1
+
+string.append(infix[cp:])
+
+for i in range(len(string)):
+ if '[' in string[i]:
+
+ temp['t'+str(count)] = ('*',string[i][string[i].index('[')+1],'8')
+ count += 1
+ temp['t'+str(count)] = ('[]',string[i][:string[i].index('[')],'t'+str(count-1))
+ string[i] = 't'+str(count)
+ count += 1
+
+
+while len(string)!=1:
+
+ temp['t'+str(count)] = (string[1],string[0],string[2])
+ string = string[3:]
+ string = ['t'+str(count)] + string
+ count += 1
+
+print('\n','THREE ADDRESS CODES'.center(15,' '))
+for k,v in temp.items():
+ if v[0]!='[]':
+ print(k.center(3,' '),'='.center(3,' '),v[1].center(3,' '),v[0].center(3,' '),v[2])
+ else :
+ print(k.center(3,' '),'='.center(3,' '),v[1].center(3,' '),'['+v[2]+']')
+print(result.center(3,' '), '='.center(3,' '), 't{0}'.format(count-1).center(3,' '))
+
+temp[result] = ('=','t'+str(count-1),'---')
+print("\n","QUADRUPLE TABLE".center(20,' '))
+print('op'.center(3,' '),'arg1'.center(5,' '),'arg2'.center(5,' '),'result'.center(7,' '))
+for k,v in temp.items(): print(v[0].center(3,' '),v[1].center(5,' '),v[2].center(5,' '),k.center(7,' '))
diff --git a/ICG/postfix.py b/ICG/postfix.py
new file mode 100644
index 0000000..a1243e7
--- /dev/null
+++ b/ICG/postfix.py
@@ -0,0 +1,23 @@
+postfix = input("Enter postfix expression : ").replace(' ','')
+result = input("Enter resultant variable : ")
+temp,string,stack,operators = {},[],[_ for _ in postfix],['+','-','*','/']
+count = 1
+while len(stack)!=0:
+ if stack[0] in operators:
+ temp['t'+str(count)] = (stack[0],string[0],string[1])
+ stack[0] = 't'+str(count)
+ string = []
+ count += 1
+ else:
+ string.append(stack[0])
+ stack = stack[1:]
+
+print('\n','THREE ADDRESS CODES'.center(15,' '))
+for k,v in temp.items(): print(k.center(3,' '),'='.center(3,' '),v[1].center(3,' '),v[0].center(3,' '),v[2].center(3,' '))
+print(result.center(3,' '), '='.center(3,' '), 't{0}'.format(count-1).center(3,' '))
+
+
+temp[result] = ('=','t'+str(count-1),'---')
+print("\n","QUADRUPLE TABLE".center(20,' '))
+print('op'.center(3,' '),'arg1'.center(5,' '),'arg2'.center(5,' '),'result'.center(7,' '))
+for k,v in temp.items(): print(v[0].center(3,' '),v[1].center(5,' '),v[2].center(5,' '),k.center(7,' '))
diff --git a/Macros/.idea/Macros.iml b/Macros/.idea/Macros.iml
new file mode 100644
index 0000000..7c9d48f
--- /dev/null
+++ b/Macros/.idea/Macros.iml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Macros/.idea/encodings.xml b/Macros/.idea/encodings.xml
new file mode 100644
index 0000000..15a15b2
--- /dev/null
+++ b/Macros/.idea/encodings.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/Macros/.idea/inspectionProfiles/Project_Default.xml b/Macros/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..c405810
--- /dev/null
+++ b/Macros/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Macros/.idea/misc.xml b/Macros/.idea/misc.xml
new file mode 100644
index 0000000..3999087
--- /dev/null
+++ b/Macros/.idea/misc.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Macros/.idea/modules.xml b/Macros/.idea/modules.xml
new file mode 100644
index 0000000..21bf2e1
--- /dev/null
+++ b/Macros/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Macros/.idea/vcs.xml b/Macros/.idea/vcs.xml
new file mode 100644
index 0000000..6c0b863
--- /dev/null
+++ b/Macros/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Macros/.idea/workspace.xml b/Macros/.idea/workspace.xml
new file mode 100644
index 0000000..4c19eeb
--- /dev/null
+++ b/Macros/.idea/workspace.xml
@@ -0,0 +1,177 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1555562310486
+
+
+ 1555562310486
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Macros/assembly.c b/Macros/assembly.c
new file mode 100644
index 0000000..98449e9
--- /dev/null
+++ b/Macros/assembly.c
@@ -0,0 +1,26 @@
+COPY START 0
+RDBUFF MACRO &INDEV,&BUFADR,&RECLTH
+ CLEAR X
+ CLEAR A
+ CLEAR S
+ +LDT #4096
+ TD =X'&INDEV'
+ JEQ *-3
+ RD =X'&INDEV'
+ COMPR A,S
+ JEQ *+11
+ STCH &BUFADR,X
+ TIXR T
+ JLT *-19
+ STX &RECLTH
+ MEND
+WRBUFF MACRO &OUTDEV,&BUFADR,&RECLTH
+ CLEAR X
+ LDT &RECLTH
+ LDCH &BUFADR,X
+ TD =X'&OUTDEV'
+ JEQ *-3
+ WD =X'&OUTDEV'
+ TIXR T
+ JLT *-14
+ MEND
diff --git a/Macros/macros.py b/Macros/macros.py
new file mode 100644
index 0000000..2ac77f7
--- /dev/null
+++ b/Macros/macros.py
@@ -0,0 +1,39 @@
+file = open('assembly.c', 'r')
+lines = file.readlines()
+instructions = []
+
+for line in lines:
+ line = line.replace('\n', '').split(' ')
+ if '' in line:
+ line = list(filter(lambda x: x != '', line))
+ # print(line)
+ instructions.append(line)
+
+MNT = {}
+MDT = {}
+ALA = {}
+
+index_count = 0
+keep_track = False
+
+for instruction in instructions:
+ if len(instruction) == 3:
+ if instruction[1] == 'MACRO':
+ MNT[instruction[0]] = index_count
+ ALA[instruction[0]] = instruction[2]
+ keep_track = True
+ else:
+ keep_track = False
+ elif len(instruction) == 2:
+ if keep_track:
+ MDT[index_count] = instruction[0]+' '+instruction[1]
+ index_count += 1
+ else:
+ if keep_track and instruction[0] == 'MEND':
+ MDT[index_count] = instruction[0]
+ index_count += 1
+ keep_track = False
+
+for k, v in MNT.items(): print(k, v)
+for k, v in MDT.items(): print(k, v)
+for k, v in ALA.items(): print(k, v)