Assembly Language Part-III
Computer Architecture · 10,709 words · 54 min read · EN-ORIG

Below is the complete, readable transcript of Assembly Language Part-III by Computer Architecture on YouTube. Read the full text, copy any part you need, or generate a transcript for any video with our free tool.
Now it's time for us to look at some advanced concepts, namely functions and stacks. So what we have discussed up till now will take us to a certain point, but it will not allow us to write fairly difficult or complicated assembly programs. As a result, it is necessary to introduce a couple of
slightly more advanced and complicated concepts, and the most important of that being functions. And to support functions, we need a software structure called a stack. Uh so what is a function? So so let's consider a C program. A function is essentially a block of code that achieves a certain specific task. So we give a function a set of
arguments, and then uh for example, if there's a function to find if a number is a prime number or not, then the number is a is an argument to this function. And the result, a Boolean result, of whether the number is prime or not, is what the function returns. So similarly, we should be able to write
functions in assembly language as well, uh similar to a high-level programming language. So if you think about how functions are will actually be represented in memory, uh it is something like this as shown here, that it is a we take a region of memory, put in all the instructions of the function here.
So, I'll just write ins to be short. So, all the instructions, we put them in a continuous region of memory. And this region of memory which starts at this point, the beginning, the first byte. Uh so, this is the beginning of the function. And so, any function, so foo traditionally is the name of a function
when we give an example. Uh so, in this case, this continuous region of memory stores all the instructions of the function. The data is stored somewhere else. We'll come to that. And uh any function will be identified by the address, the starting address of the first instruction. So, to call a function, what do we need
Transcribe another video
Paste any YouTube, Instagram or TikTok link to get a free transcript.