Surprise Me!

x86-64 Assembly Pointers & Dereferencing Explained - Hybrid C++/YASM Example

2026-02-22 9 Dailymotion

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.

Great for assembly beginners moving to real programs, systems programming students, or anyone curious how low-level code talks to C/C++.

00:00 Introduction to Pointers and Dereferencing in x86-64 Assembly
00:28 Pointers explained in C++
01:02 Changing values via pointers in C++
01:43 Pointers in assembly basics
02:09 Defining variables and pointers in YASM data section
03:23 Pointers are always integers even to doubles
04:20 Function arguments are pointers treated as 64-bit integers
05:00 Driver C++ code overview
05:58 Marking extern "C" functions
06:40 Local stack variables and passing pointers
07:51 Stack lifetime warning
08:34 Assembly data section strings and numbers
09:39 Print null-terminated string helper functions
10:38 External symbols and hey_driver_print_this
11:29 Point function prologue and stack alignment
13:04 Extra push for 16-byte alignment
14:20 Printing welcome message from assembly
16:00 Driver sees initial long value
16:58 Printing received string from C++
18:20 Using received char pointer without dereference
20:21 Modifying incoming long via dereference
21:46 Driver sees modified long value 101
22:43 Calling back to C++ to print assembly-owned data
23:48 Passing pointers to assembly string long and double
25:08 Driver prints assembly-owned values and addresses
26:14 Summary of pointer passing between modules
26:36 Stack alignment crash demonstration
27:39 Adding extra push/pop fixes segfault
28:00 Closing remarks and call to subscribe

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

=-=-=-=-=-=-=-=-=

Thanks for watching!

Find us on other social media here:
- https://www.NeuralLantern.com/social
- Twitter / X: https://x.com/NeuralLantern
- Rumble: https://rumble.com/c/c-3696939
- BitChute: https://www.bitchute.com/channel/pg1Pvv5dN4Gt
- Daily Motion: https://www.dailymotion.com/neurallantern
- Minds: https://www.minds.com/neurallantern/
- Odysee: https://odysee.com/@NeuralLantern:5

Please show your support!

- Buy me a coffee: https://ko-fi.com/neurallantern

- Subscribe + Sharing on Social Media
- Leave a comment or suggestion
- Subscribe to Blog: https://www.NeuralLantern.com
- Watching the main "pinned" video of this channel for offers and extras