Learn pointers & dereferencing in x86-64 YASM assembly and how to pass them correctly between assembly and C++ in a hybrid program. We build a small working example that sends strings, longs, and doubles both directions using pointers, modifies values across module boundaries, and explains why pointer-to-double still uses general-purpose registers. Includes a quick demo of stack misalignment crash + fix.<br /><br />Great for assembly beginners moving to real programs, systems programming students, or anyone curious how low-level code talks to C/C++.<br /><br />00:00 Introduction to Pointers and Dereferencing in x86-64 Assembly<br />00:28 Pointers explained in C++<br />01:02 Changing values via pointers in C++<br />01:43 Pointers in assembly basics<br />02:09 Defining variables and pointers in YASM data section<br />03:23 Pointers are always integers even to doubles<br />04:20 Function arguments are pointers treated as 64-bit integers<br />05:00 Driver C++ code overview<br />05:58 Marking extern "C" functions<br />06:40 Local stack variables and passing pointers<br />07:51 Stack lifetime warning<br />08:34 Assembly data section strings and numbers<br />09:39 Print null-terminated string helper functions<br />10:38 External symbols and hey_driver_print_this<br />11:29 Point function prologue and stack alignment<br />13:04 Extra push for 16-byte alignment<br />14:20 Printing welcome message from assembly<br />16:00 Driver sees initial long value<br />16:58 Printing received string from C++<br />18:20 Using received char pointer without dereference<br />20:21 Modifying incoming long via dereference<br />21:46 Driver sees modified long value 101<br />22:43 Calling back to C++ to print assembly-owned data<br />23:48 Passing pointers to assembly string long and double<br />25:08 Driver prints assembly-owned values and addresses<br />26:14 Summary of pointer passing between modules<br />26:36 Stack alignment crash demonstration<br />27:39 Adding extra push/pop fixes segfault<br />28:00 Closing remarks and call to subscribe<br /><br />x86-64 assembly, YASM assembly, assembly pointers, dereferencing assembly, hybrid C++ assembly, assembly C++ interop, x86-64 pointers, assembly memory addresses, low level programming, systems programming, assembly tutorial, x86 assembly tutorial, YASM tutorial, passing pointers assembly, stack alignment assembly, x86-64 calling convention, assembly data section, extern C assembly<br /><br />=-=-=-=-=-=-=-=-=<br /><br />Thanks for watching!<br /><br />Find us on other social media here:<br />- https://www.NeuralLantern.com/social<br />- Twitter / X: https://x.com/NeuralLantern<br />- Rumble: https://rumble.com/c/c-3696939<br />- BitChute: https://www.bitchute.com/channel/pg1Pvv5dN4Gt<br />- Daily Motion: https://www.dailymotion.com/neurallantern<br />- Minds: https://www.minds.com/neurallantern/<br />- Odysee: https://odysee.com/@NeuralLantern:5<br /><br />Please show your support!<br /><br />- Buy me a coffee: https://ko-fi.com/neurallantern<br /><br />- Subscribe + Sharing on Social Media<br />- Leave a comment or suggestion<br />- Subscribe to Blog: https://www.NeuralLantern.com<br />- Watching the main "pinned" video of this channel for offers and extras<br />
