Premium Only Content
Mix C++, C, and Assembly into One Program - Hybrid Program Full Build Tutorial
Want to write a single program that uses C++ for high-level logic, C for portability, and assembly for speed? This video shows exactly how to do it.
We build a complete hybrid program from scratch:
- driver.cpp - contains main(), prints intro, calls assembly
- c.c - simple printf() function
- cpp.cpp - C++ function (with extern "C" to disable name mangling)
- hello.asm - assembly module that prints messages, calls C and C++ functions
You?ll see:
- Why hybrid programs matter
- How source files ? object files ? final executable
- The role of the driver and why main() lives once
- Name mangling in C++ and how extern "C" fixes interop
- Global / extern in assembly to expose and call functions
- A clean Makefile that compiles each module separately
- Live build and execution with output explained line-by-line
By the end you?ll know how to call across languages safely, pass basic args via registers, and structure projects for fast incremental builds.
No prior assembly required - just basic C/C++ familiarity. Code is copy-paste ready.
Timestamps in comments. Source files linked below.
Like & subscribe for more systems programming!
What is a Hybrid Program 00:00:00
Why Use Hybrid Programs 00:00:21
Program Modules Overview 00:01:10
Compilation to Object Files 00:02:23
Makefile Introduction 00:04:26
Driver Module Setup 00:06:43
Name Mangling Explained 00:07:18
C++ Module with extern C 00:07:43
Driver Main Function 00:10:12
C Module Implementation 00:11:52
Assembly Module Setup 00:12:41
Assembly Data Section 00:13:03
Assembly Text Section 00:14:18
Global and External Functions 00:14:35
Assembly System Calls 00:16:20
Calling C from Assembly 00:18:58
Calling C++ from Assembly 00:20:32
Program Execution Flow 00:21:05
Running the Program 00:23:59
Passing Arguments Between Modules 00:26:23
Hybrid Program Summary 00:29:11
Thanks for watching!
Find us on other social media here:
- https://www.NeuralLantern.com/social
Please help support us!
- Subscribing + Sharing on Social Media
- Leaving a comment or suggestion
- Subscribing to our Blog
- Watching the main "pinned" video of this channel for offers and extras
-
LIVE
The Shannon Joy Show
1 hour agoSJ LIVE Dec 16 - TACO Trump Flees California After Judge Orders Him To Remove Troops! Plus The Bitcoin Collapse & AI Bubble W/ Fin-Analyst Jack Gamble!
215 watching -
57:04
efenigson
2 hours agoSentenced For Building Freedom! Live: Samourai Wallet's Keonne Rodriguez
4.4K3 -
1:56:02
Benny Johnson
2 hours agoDark New Mysterious Footage Of Brown University Killer RELEASED After Republican Leader MURDERED...
25.2K15 -
DVR
Chad Prather
2 hours agoWhy Trump’s Response To Rob Reiner Passing MISSED THE MARK + Erika Kirk & Candace Meet & Bible Q&A!
2.99K7 -
1:59:07
Badlands Media
9 hours agoBadlands Daily: 12/16/25
23.2K8 -
2:59:32
Wendy Bell Radio
7 hours agoUnapologetic
47.6K79 -
55:53
The Big Migâ„¢
3 hours agoTrump Classifies Fentanyl, A Weapon Of Mass Destruction
3.57K11 -
1:05:22
Graham Allen
4 hours agoDid Trump Cross A Line? Erika & Candace Are Alive! + Are We Changing Minds On Radical Islam?!
134K958 -
1:10:11
Chad Prather
11 hours agoWhen Life Pushes You Out of Place
96.5K41 -
13:48
Rethinking the Dollar
12 hours agoLiquidity Flood Incoming? This Chart Will Shock You.
11.6K