Advanced C Programming: Integrating C and Assembly Language
50mAdvanced2021-01-05
Authors

Dan Gookin
Creator, Teacher, and Technology Writer with 20+ years of experience
Course details
Though a C compiler is efficient, it's possible to work with both C and assembly, enjoying the speed of assembly with the lower development time of C. In this course, instructor Dan Gookin teaches you how to link C and assembly object files, call C functions from assembly code, as well as write assembly inline in a C function. Dan starts by explaining how to acquire an assembler and run C and assembly programs. He discusses how integrating C and assembly language can improve your coding skills and program performance. He walks you through how to create a program in assembly by processing the proper steps: assemble, link, and run. Dan shows you how the compiler translates C instructions into assembly and how to optimize your C code by using assembly to target bottlenecks. He goes over how to join assembly code with C code, as well as how to use C language functions in assembly code. In conclusion, Dan explains how to use assembly functions for C.
Skills covered
CProgramming LanguagesOpen SourceSoftware DevelopmentDeep Dive (X:Y)
Concepts
0. Introduction
- 01 - Combining C with assembly language
- 02 - Course requirements
1. Assembly Language Overview
- 03 - Controlling the CPU with assembly and C
- 04 - Exploring assembly language
- 05 - Building assembly code
- 06 - Challenge - Build an assembly program
- 07 - Solution - Build an assembly program
2. The Assembly Side of C
- 08 - Viewing C as assembly
- 09 - Choosing C or assembly
- 10 - Challenge - Linking modules
- 11 - Solution - Linking modules
3. C and Assembly Integration
- 12 - Putting assembly language into C code
- 13 - Adding C to assembly
- 14 - Writing inline assembly
- 15 - Challenge - Constructing a dialog
- 16 - Solution - Constructing a dialog
4. Assembly Functions for C
- 17 - Passing arguments in assembly
- 18 - Returning a value in assembly
- 19 - Writing functions that pass and return values
- 20 - Challenge - Random range
- 21 - Solution - Random range