39 Comments

  1. The movl %eax, -0x14(%rbp) instruction could be unused code generated by the compiler. Compilers (especially older generations or without optimization) may do this sometimes because they might think, This y variable may be used for another thing later, so let me keep it in the %eax register and back it up in memory.

  2. Not sure I can program an old game like Doom with C language?? How do you get all the graphics and graphical controls working. Surely it took a really long time. What are some of the command that would be used in graphical manipulation? I only got to be able to do maths and print text on screen. Then gave up.

  3. After 11 Years still perfect content to grasp!!! Well done!!
    The first assembly lines are set up for ret addr and ret value for int main and reserve var space on stack. But i am sure u already know this xD

  4. So… I endeavored to teach myself assembly when I was all the way back in probably middle school… found the book in the library… looked in it… just to get the current time and print it out took about 20 pages of code… I was like SCREW THAT and never looked back but your code appears to be much shorter than that… is that reasonable to believe?

  5. When i got a real computer (i did have a Sinclair and some books so i was aware of things) i got vc++. I finally found the "hello windows" api sample. I got a micro controller board and did the assembly and c samples…this helped. ..i later did a precreate() and inherited the app class but eliminated all win frame windows and used c to write my programs. I cringe when i hear these discussions about languages…it is all machine code in the end. This comparison is exactly what i did on micro. That was when it made sense. I am very disappointed that math and science classes don't teach some pascal or c logic…history classes should discuss computer history. I always found it easier to investigate the origins of technology…this shows how the more managable ideas grow into more advanced systems. I know so many people that think tech is black magic and refuse to engage. Everyone should see this comparison. See how a few lines of code works. Learn that they can apply logic to live decisions. If rob liker store then…go to prision…simple stuff like that

  6. これはコンパイラが出力したマシン語を解説している動画になります。
    実際にマシン語でプログラムを組む場合は、変数をメモリーのどの番地に格納するかを自分で決めないといけません。
    (スタック内で処理する場合はこの限りではありません)
    画面表示も、1文字ずつ表示したい場所のVRAMアドレスを求め、キャラクターコードを直接書き込む必要があります。

  7. For the printf block around 6:15, Ben glosses over why gcc sets low byte of rax to 0. `movb $0x0, %al` I had a guess about null termination of the return value of printf, but that's void, so I asked the bot. Pretty interesting:

    This has nothing to do with null-terminating the string or with printf's return value. This is a requirement of the System V AMD64 ABI for variadic functions (functions that take … in their prototype, like printf).
    The ABI says: before calling a variadic function, the caller must set %al to the number of vector (SSE/floating-point) registers being used to pass arguments. Since this call to printf("%dn", x) passes only an integer — no floating-point arguments — the count is zero. So %al is set to 0x0

    Also if anyone wants to disassemble on linux, you can use objdump.

  8. American study method: real machine asm and C.
    European study method: asm of a simplified von Neumann machine and pseudocode similar to pascal.
    🧐

Leave a Reply

Your email address will not be published. Required fields are marked *

You might like

© 2026 Cantinho do Vídeo - WordPress Video Theme by WPEnjoy