Machine Language Instructions: Program Control - Branching, Function Calls and the Stack

Publicado em: 11 Outubro 2020
no canal de: Coding Coach
356
5

In our previous videos and explorations creating machine level programs we focused on program control using branching to produce programs that could perform conditional operations and iteration. Now we are going to find out how to "Jump" from a location in our code to another in such a way that we can return. This is how we call a function in our high level programs. The locations that we jump from when calling a function are retained in a stack data structure. Each time we perform a function call, the calling location is pushed into the stack to be popped out when the function call completes. This same method allows our programs to preform recursion as well.

This video also has a guest appearance from the kitten Belle who is so excited to learn how function calls are managed at the lowest level, she jumps up at the end of the video, sorry!

Please like this video and subscribe and would like to see more like it!    / @codingcoach  

It is part of my Computer Organization and Architecture course which you can find here:    • Computer Organization and Architecture  

If you have not seen the Little Man Computer (LMC) series of videos, they are highly recommended before this one you can find them here:
A recommended introduction to Little Man computer video here:    • Little Man Computer Explained: Introd...  
A "Hello LMC" video where we do a smaller program and talk more in-depth about the instruction cycle and basic instructions:    • Little Man Computer (LMC) Explained: ...  
And an intermediate step where we introduce branching and explore recreating conditional statements with LMC:    • Little Man Computer (LMC) Explained: ...  
Finally we explore iteration, labels and advanced LMC:    • Little Man Computer (LMC): Assembler ...  

Here are presentation slides that can be used as a supplement to follow along and as a future reference for this content: https://drive.google.com/file/d/1ArN_...


Nesta página do site você pode assistir ao vídeo on-line Machine Language Instructions: Program Control - Branching, Function Calls and the Stack duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Coding Coach 11 Outubro 2020, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 356 vezes e gostou 5 espectadores. Boa visualização!