What if, value's a symbol?

Well, I just want to, remind you, what what we said earlier.

We're going to, deal with symbols later on.

So, translating instructions is, is

something that's not terribly complicated, but once again it takes, some programming.

All right, what about C-instructions.

Well, C-instructions also have a symbolic

manifestation and and a binary manifestation.

And there's a set of tables, so to speak, that describe the mapping from.

Symbolic pneumonics into their binary representations.

So these are the rules of the game when it comes to translating C-instructions.

So how do you actually do it?

I think the easier way to to describe the translation process is to

do it using an example.

So suppose we're giving this single

C-instruction and we have to translate that into binary code.

Well, before we go on I want to remind you that every C-instruction

consists of three fields.

So, in the example that we have here.

The MD pneumonic is the destination field or

the value of the destination field in this particular instruction.

Then comes D plus 1, which is the value of the comp or

computational, computation field.

And we also have a jump field which happens to be null.

You know, we don't have a jump instruction here so the jump is a null.

So implicit in what I'm saying is the assumption that we can

somehow take this source instruction and decompose it into these three fields.

And indeed this is something that is going to be done by an element of our assembler

called parser.

The parser is going to take a source statement or

instruction written in symbolic code and chop it into three individual,

individual fields, and then we can inspect every one of these fields in isolation.

And act on it, and that's exactly what I'm going to do next.

So, let us begin to, put together the string of characters

that will end up representing the binary code of MD equals D plus one.

We can do it in, in many different ways, and here is one of them.