The speaker discusses the benefits of learning assembly language, which allows a deeper understanding of how computers work at a low level. They introduce a technique called the "assembly Rosetta Stone", which involves using a small piece of C code to learn the basics of assembly language. The speaker demonstrates this technique using ARM 64-bit assembly language.
The speaker explains that assembly language can be broken down into a series of instructions, similar to sentences in a language. By understanding these instructions in C, one can more easily learn assembly language. They demonstrate this by showing how values are stored in registers and how they are moved onto the stack.
The speaker also explains the concept of calling conventions, which are agreements between functions on how arguments and return values are passed. They demonstrate this using a function in ARM 64 assembly language.
The speaker then shows how to perform branching and conditional branches in ARM 64 assembly language, using a control flow structure in C code. They explain that by loading a value into a register and comparing it to another value, one can perform conditional branches.
Finally, the speaker discusses the syscall interface, which allows a program to request services from the kernel. They demonstrate how to perform a syscall in ARM 64 assembly language.
However, the speaker notes that the "assembly Rosetta Stone" technique has its limitations. While it is useful for understanding the basics of assembly language, it does not cover more complex aspects such as the prologue and epilogue of assembly language, which are used to set up and tear down a function's stack frame. For these more advanced topics, the speaker advises further research.
1. Learning to write assembly is considered one of the easiest ways to improve programming skills and understand how computers work at a low level.
2. Learning assembly can make you feel like a wizard, but it can be difficult to learn due to the lack of resources available online.
3. The technique being taught here is called the assembly Rosetta Stone, a bit of C code that can be compiled and viewed in assembly to learn the basics.
4. The Rosetta Stone technique is being used to re-teach the speaker armed 64-bit architecture.
5. The speaker is not the first one to come up with the Rosetta Stone technique, with Tim Ferriss's blog being the original source of the idea.
6. The speaker is teaching through the Rosetta Stone technique using the concept of sentences in C, which can be understood to learn assembly.
7. The speaker has created three separate values, 64 bits long, 32 bits long, and another 32 bits long.
8. The speaker wants to see what registers these values get stored in the assembly and how they get put onto the stack.
9. The speaker is using the Rosetta Stone compiled into the target architecture, arm 64, and object dumping it to see their main function.
10. The speaker has learned about the 64-bit value and the 32-bit value, and how they differ in the architecture.
11. The speaker has learned the names of the registers, their width, and how they get used.
12. The speaker is going into the calling conventions, which is a fundamental piece of computer science and computer engineering.
13. The speaker is learning the arm 64 calling convention using the Rosetta Stone technique.
14. The speaker is learning how arm 64 passes arguments into function calls to call other functions.
15. The speaker has learned that the return value for functions in arm 64 goes into w0.
16. The speaker has learned how conditional branches work, how the fundamentals of if statements, for statements, and while statements work in arm 64 assembly.
17. The speaker is tackling the last part of the learning process, the syscall interface.
18. The speaker is learning that to do a syscall in 64-bit arm assembly, the syscall number is put into W8 and the rest of the arguments are put into that register plus one.
19. The speaker has recognized that this technique works for certain things but not all, and there are some techniques that need to be Googled.