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
-
2:04:53
Redacted News
3 hours agoPutin just changed EVERYTHING with this move and NATO can't do anything | Redacted w Clayton Morris
124K99 -
25:22
DeVory Darkins
3 hours agoTrump scores MAJOR WIN after Inflation Report as his speech sparks EPIC MELTDOWN
24K38 -
1:01:23
Nick Freitas
4 hours agoLIVE at America Fest!
37.1K2 -
1:11:19
vivafrei
5 hours agoCandace Owens' Backtracks? Brown University Cover-Up? Bongino Leaves! Pfizer Makes LEGAL ADMISSIONS?
120K64 -
56:22
The Nunn Report - w/ Dan Nunn
5 hours ago[Ep 813] LIVE from Rumble Set at AmFest 2025 | Guests Vem, Midnight, & Kevin Smith
41K3 -
29:58
Stephen Gardner
5 hours ago🔥IT'S BAD! NEW report just DROPPED!
43.5K33 -
LIVE
LFA TV
20 hours agoLIVE & BREAKING NEWS! | THURSDAY 12/18/25
903 watching -
1:47:16
freecastle
8 hours agoTAKE UP YOUR CROSS- A man’s heart PLANS his way, but the LORD DIRECTS his steps!
13.2K3 -
1:03:40
John Crump Live
3 hours ago $0.46 earnedChristmas Special
10.2K -
54:53
The Quartering
8 hours agoDan Bongino Quits, New Break In Tyler Robinson Case & Brown Shooting!
135K71