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
-
25:14
Stephen Gardner
5 hours agoCLINTONS PANIC AS ARREST CALLS EXPLODE – Scott Jennings GOES OFF! 😱
30.8K26 -
2:14:15
DLDAfterDark
4 hours ago $1.18 earnedThe AR15 BurnDown That Will Leave You Speechless!
19.4K1 -
1:48:12
megimu32
4 hours agoON THE SUBJECT: Throwback Thursday | Wheel of Nostalgia Chaos!
27.1K9 -
2:32:11
Flyover Conservatives
1 day agoTrojan Horse in the Big Apple? Prophetic Warning w/ Robin D. Bullock | FOC Show
32.6K9 -
1:31:48
Precision Rifle Network
1 day agoS5E6 Guns & Grub - The Boys Are Back!
15.5K8 -
4:29:29
SynthTrax & DJ Cheezus Livestreams
4 days agoLumines - Arise - DJ Cheezus Birthday Stream
23.1K2 -
1:00:41
Glenn Greenwald
9 hours agoEXCLUSIVE: Succession Actress & Podcast Host Dasha Nekrasova Speaks Out About Hollywood Cancellation Over Fuentes Interview | SYSTEM UPDATE #549
119K110 -
31:27
Robbi On The Record
11 hours ago $2.73 earnedWhat the Bible say about Astrology.. The Conversation Culture Has Been Avoiding | ft. JT Follows JC
25.7K5 -
2:58:45
SOLTEKGG
4 hours ago🟢 Live: Pro Player Returns to Battlefield 6 RED SEC
12.7K -
2:16:25
XDDX_HiTower
4 hours ago $1.02 earnedGray Zone Warfare [RGMT CONTENT Mgr. | RGMT GL | GZW CL]
11.4K