NASM Assembly programming Tutorial 02

In this video I talk about how to compile our assembly program using linux shell scripting, specifically bash. Then I discuss how to use and declare variables in your .data section. Also, the difference between assembly labels and and memory address is made clear: labels are memory address.

Also we mix c and assembly code together so that we can call C library functions from our assembly code!

visit my blog at


Wilfredo Villegas says:

Thanks for your answer

Drew Walton says:

If you’re running a 64-bit OS, this script will allow you to set 32 bits or 64 bits, depending on the code you’re writing.

Karliah says:

you should really try to go in depth into all the variables you have there, for example you never talked about msgLen

SolidusCode says:

its more about preference. I too find myself sometimes using the colon, and sometimes not, (specially when I am lazy)

EpicGuard005 says:

How can I get my Gedit editor to highlight syntax in Assembly? I looked for addons but I couldn’t find one. Did you use a layout specific for assembly, or set it up with C highlighting or something?

Siva Rama says:

but then how did push DWORD msglen worked ??? you have to give even that [ ] right

The Illuminated One says:

why so much time betwen the last tutorial???

Wilfredo Villegas says:


If I write
msg db “Hello World!, This is assembly”,10,0 ; Without colon
that’s compile very well, the Question is, Why use colon or not?

Best regards
Excellent tutorial.

julianx2rl says:

I’m getting – bash: ./ No existe el fichero o el directorio – at – 3:50

SolidusCode says:

No problem, in my future videos i will have a larger font size. Also check out as the same information is available there. Thanx

SolidusCode says:

time is short i suppose, I try to post videos regularly in between other projects.

thanks for your patience though

James Jeffery says:

push DWORD [i] … you said braces. Those are not braces those are square brackets.

insominx says:

It would be helpful to have that script you mentioned available to download from a link in your description.

Kevin M. Thomas says:

Great tutorial! Question – how would you prevent a buffer overflow so that the user does not input more than the dw for example? What would be the specific logic for cmp to then jne if the value is bigger than 8 bytes or 16 bits?

Fort Thronx says:

32 bit of dd is define decimal NOT double,
64 bit of it is define double/floating number…

SolidusCode says:

I most likely meant to type “fmt” short for “format”

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 HatsFooding▷ 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▷ VapesHigh 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