Now, how do we do it?
Well, once again you are welcome to write this assembler In any high level,
language that you please.
And yet we recommend that you follow a certain software architecture.
And we describe this architecture in the previous unit,
so I don't want to spend too much time talking about it.
But I just want to remind you the architecture that we
propose consists of four different software modules.
Each of these modules should be, should be a stand alone software module that can,
can also be unit tested in isolation from the other modules.
So we need a parser that unpacks each instruction into It's underlying fields.
We need a module called code that actually translates the symbolic fields,
the mnemonics into, it's, corresponding, binary value.
And by the way, I should say it more precisely.
It's not that the module translates.
The module has a set of methods that are used to carry out this translation.
We need a symbol table module that contains a set of methods that manages,
that manage, and create, create and manage a symbol table.
And finally we need the main module which actually drives the show, and
you know it opens the input file, it creates an output file, and
actually go through the entire translation process by calling
methods from the previously described modules.
This main module will probably be named the hack assembler or
something like that, depending on the language that you will end up using.
So this is the proposed,
architecture that we recommend that you use in oder to develop the assembler.
Now, how should you actually go about it,
how should you actually do the implementation?
Well, we recommend that, you follow what,
what is sometimes called a staged development.
We want you to develop, the assembler in stages.
So, first of all, as I described in previous units.
We want you to write a basic assembler, that, can handle
programs or hack assembly programs that contain no symbols.
Once you write this assembler, we want you to test it in isolation,
that is test it before you move on and do other things in this, project.
Once this, assembler, basic assembler works to your satisfaction.
You can go on and develop the symbol table module that can also be tested and,
and, and, you should verify that you can create a symbol table and
manage it in isolation from the other pieces of the project.