PASS 1. FLOW CHART
The primary function performed by the analysis
phase is the building of the symbol table. For this purpose it must determine
the addresses with which the symbol names used in a program are associated. It
is possible to determine some address directly, e.g. the address of the first
instruction in the program, however others must be inferred.
To implement memory
allocation a data structure called location
counter (LC) is introduced. The location counter is always made to
contain the address of the next memory word in the target program. It is
initialized to the constant. Whenever the analysis phase sees a label in an
assembly statement, it enters the label and the contents of LC in a new entry
of the symbol table. It then finds the number of memory words required by the
assembly statement and updates; the LC contents. This ensure: that LC points to
the next memory word in the target program even when machine instructions have
different lengths and DS/DC statements reserve different amounts of memory. To
update the contents of LC, analysis phase needs to know lengths of different
instructions. This information simply depends on the assembly language hence the
mnemonics table can be extended to include this information in a new field
called length. We
refer to the processing involved in maintaining the location counter as LC processing.
Great flowchart. I found a great tool for drawing them on the web from Lucidchart. It is an extremely powerful tool and allows real time collaboration. I highly recommend checking it out.
ReplyDeleteAwesome flowchart.i am very useful your explination..
ReplyDeleteand i was get full marks of my final exam.
thanks a lot.
Congrats bro and thanks for writing to us. You can subscribe to my youtube channel channel for latest tech videos:
ReplyDeletehttps://www.youtube.com/channel/UCnRCUB8utEFY0xqm7L92yZg
HTTP Protocol
ReplyDeleteIdentification of Objects in the Software Configuration
IEEE 802.11 Services
Inheritance Types
Input Output Configuration
Inside-Outside Tests
Instruction Cycle
Introduction Game Playing
Thank you
ReplyDeleteNice
ReplyDeleteFor pass 2?
ReplyDelete