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


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

Please click below to support us on Facebook!