With the given source code below, you are to perform a 2-pass assembler operation. You are required to create the symbol table for all of the symbols and to replace the labels in the code with their correct values. State in which pass the symbols' value was updated. Assume that after you perform the first pass, your assembler finds that the location of _remove is 288 and _add is 364.
NOTE: The address of the instruction/label in memory runs along the left side of the instructions. Empty lines do not count as space in memory. Directives are not instructions and thus do not affect the address.
Fill out a table with the name of each symbol, in the order it would be detected during the first pass of the assembler, and their values as established by the end of the second pass.
.global _start
.extern remove
.extern add
0 _start: movia R3, Arr
4 movia R4, NUM
8 movia R9, Arr2
12 move R10,0
16 movia SP, 0x7FFFFFC
20 ldw R4, 0(R4)
24 LOOP: beq R4, R0, DONE
28 ldw R5,0(R3)
32 addi R3,R3,4
36 subi R4, R4,1
40 bge R5,R0,POS
44 subi SP,SP,8
48 stw R4,0(SP)
52 stw R3,4(SP)
56 call _remove
60 ldw R6,0(SP)
64 addi SP,SP,8
68 br LOOP
72 POS: subi SP, SP, 12
76 stw R9,0(SP)
80 stw R10,4(SP)
84 stw R5,8(SP)
88 call _add
92 ldw R9,0(SP)
96 ldw R10,SP
100 addi SP,SP,12
104 br LOOP
108 DONE: br DONE
.org 1000
.data 1000
Arr:.word 1,2,3,4,5,6,7
1028 NUM:.word 7
1032 Arr2: .skip 28