And in this video we'll be looking into assembly.
So we have seen that the history of uh, this thing, how they used to execute first they used to have
ones and zeros, sequence of ones and zeros.
Then they moved by writing the OP codes directly.
And now after that they move to the assembly language.
So we are also following the same thing.
We we executed opcodes directly by writing opcodes on the hex file.
And then using a hex editor we directly used opcodes and all.
Now we are going to use an assembler and convert this assembly language to opcode and execute what we
want.
Okay.
So assembly language has a benefit.
Instead of remembering the opcodes it is like remembering add move.
It's little easier than remembering numbers like this okay.
So they follow a particular syntax.
Uh assembly program consists of sequence of statements one per line.
And each statement has a following format.
They have something known as label column instruction at the rate comment.
And each of the component is optional.
You can you can just write a label and then you can skip this to or you can just write an instruction.
And then you can skip this too.
And you can write this and skip this too.
So each of the component is optional.
But you need to have one component.
And each statement has either of this.
One component label is a convenient way to refer the location of the instruction in memory.
It can also be used when wherever an address appears as an operand for the branch instruction, and
it can consist of names, alphabets, digits, underscore, and dollar.
And then you have comment.
Comment is starts with at the rate and whatever you have after the at the rate, all those characters
are ignored.
So comment is like whatever we write in slash slash in C language here, you need to instead of using
slash slash or slash slash star, you are using at the rate here.
And then you have the actual instruction.
This instruction can be an ARM instruction or it can be an uh assembler directive.
Assembler directives are a commands to the assembler, not to the CPU.
ARM instructions are instructions to the CPU assembler director directives always start with a dot.
So example of this instruction.
Here you have this as a label.
And then you have a colon.
And you have a instruction which is a branch instruction.
And then you have an operand which is a stop.
So we can as we said, we can give wherever there is an address, we can give the label as well.
So label is a convenient way to refer to the location of the instruction in memory.
So what this operation is say while one just like a while one infinite loop.
Again, what we need to understand here is assembly language.
Uh has a particular format label colon instruction.
And then you can have a comment here I am having a comment like this.
And this is a and this can be also an instruction.
This can be a directive and directive.
They all uh, always starts with a dot.
If you are not seeing a dot, this means it is an instruction.
Uh, it is an assembly arm instruction Assembly uh, any arm instruction or it can be assembly directive.
When you see assembly assembler directive, it means it will start with a dot.