GCC Inline Assembly Tutorial – x86 codeblocks

Inline assembly in C.


5tarda says:

Can you explain me how to know that exactly at 8(%ebp) and 12(%ebp) are inputs val_1, val_2? I just don’t get this part.
Thank you.

DarkSpirit says:

Make a Video about Interrupt using inline assembly

Joaquim Jesus says:

i understand that these video is for Inline Assembly, but do you have a video for add a *.asm file on project?

Muck2014 says:

Must you install an assembler beside the compiler for this?

Mike Dev says:

Why do my compiler say that the sum function is not defined?

Joaquim Jesus says:

i’m trying testing your code without sucess :(


using namespace std;

int sum(int parameter1, int parameter2);

int main()
cout << sum(100,200); return 0; } asm( “_sum: ;” ” pushl %ebp;” ” movl %esp, %ebp;” ” movl 8(%ebp), %eax;” ” addl 12(%ebp), %eax;” ” movl %ebp, %esp;” ” popl %ebp;” ” ret” ); i get 2 errors: “invalid instruction suffix for `push'” and the same for ‘pop’. can you advice me more?

Jean Kyle says:

Does the use of inline assembly need some other installation other than code blocks?

Write a comment


Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.

Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!

Send this to a friend

▷ Other ReviewsVehicles   Show Cars   Motorbikes   Scooters   Bicycles   Rims & Tires   Luxury BoatsFashion   Sunglasses   Luxury Watches   Luxury Purses   Jeans Wear   High Heels   Kinis Swimwear   Perfumes   Jewellery   Cosmetics   Shaving Helpers   Fashion Hats   Modeling TipsFooding   Chef Club   Fooding Helpers   Coktails & LiquorsSports   Sport Shoes   Fitness & Detox   Golf Gear   Racquets   Hiking & Trek Gear   Diving Equipment   Ski Gear   Snowboards   Surf Boards   Rollers & SkatesEntertainment   DIY Guides   Zik Instruments   Published Books   Music Albums   Cine Movies   Trading Helpers   Make Money   Fishing Equipment   Paintball Supplies   Trading Card Games   Telescopes   Knives   Vapes   GameplaysHigh Tech   Flat Screens   Tech Devices   Camera Lenses   Audio HiFi   Printers   USB Devices   PC Hardware   Network Gear   Cloud Servers   Software Helpers   Programmer Helpers   Mobile Apps   Hearing AidsHome   Home Furniture   Home Appliances   Tools Workshop   Beddings   Floor Layings   Barbecues   Aquarium Gear   Safe Boxes   Office Supplies   Security Locks   Cleaning ProductsKids   Baby Strollers   Child Car Seats   Remote ControlledTravel   Luggages & Bags   Airlines Seats   Hotel Rooms   Fun Trips   Cruise Ships   Mexico Tours