<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>reverse engineering basics Archives - NeuralLantern.com</title>
	<atom:link href="https://www.NeuralLantern.com/tag/reverse-engineering-basics/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.NeuralLantern.com/tag/reverse-engineering-basics/</link>
	<description></description>
	<lastBuildDate>Sun, 01 Feb 2026 02:49:30 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.4</generator>

<image>
	<url>https://www.NeuralLantern.com/wp-content/uploads/2025/04/cropped-2025-04-04-Lantern-03-32x32.png</url>
	<title>reverse engineering basics Archives - NeuralLantern.com</title>
	<link>https://www.NeuralLantern.com/tag/reverse-engineering-basics/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>x86-64 Assembly For Loops Explained &#8211; YASM Tutorial</title>
		<link>https://www.NeuralLantern.com/x86-64-assembly-for-loops-explained-yasm-tutorial/</link>
					<comments>https://www.NeuralLantern.com/x86-64-assembly-for-loops-explained-yasm-tutorial/#respond</comments>
		
		<dc:creator><![CDATA[mike]]></dc:creator>
		<pubDate>Sun, 01 Feb 2026 02:49:29 +0000</pubDate>
				<category><![CDATA[Assembly Language]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Videos]]></category>
		<category><![CDATA[asm tutorial 2025]]></category>
		<category><![CDATA[assembly for loop]]></category>
		<category><![CDATA[assembly language tutorial]]></category>
		<category><![CDATA[assembly while loop]]></category>
		<category><![CDATA[computer architecture]]></category>
		<category><![CDATA[conditional jump assembly]]></category>
		<category><![CDATA[implementing for loop in assembly]]></category>
		<category><![CDATA[inc instruction assembly]]></category>
		<category><![CDATA[learning assembly language]]></category>
		<category><![CDATA[loop in assembly]]></category>
		<category><![CDATA[low level programming]]></category>
		<category><![CDATA[NASM vs YASM]]></category>
		<category><![CDATA[reverse engineering basics]]></category>
		<category><![CDATA[systems programming]]></category>
		<category><![CDATA[x86 assembly loops]]></category>
		<category><![CDATA[x86-64 assembly]]></category>
		<category><![CDATA[x86-64 linux assembly]]></category>
		<category><![CDATA[Yasm tutorial]]></category>
		<category><![CDATA[yasm x86-64]]></category>
		<guid isPermaLink="false">https://www.NeuralLantern.com/?p=295</guid>

					<description><![CDATA[<p>This tutorial explains how to implement a C-style for loop in x86-64 assembly using YASM by converting it to while-loop logic with initialization, conditional jump (jl), increment (inc), and unconditional jump back to the loop top. Demonstrates register usage (r12/r13), loop structure, and printing numbers inside the body.</p>
<p>The post <a href="https://www.NeuralLantern.com/x86-64-assembly-for-loops-explained-yasm-tutorial/">x86-64 Assembly For Loops Explained &#8211; YASM Tutorial</a> appeared first on <a href="https://www.NeuralLantern.com">NeuralLantern.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe title="x86-64 Assembly For Loops Explained - YASM Tutorial" width="1380" height="776" src="https://www.youtube.com/embed/pftzv5lIPso?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<p class="wp-block-paragraph">Quick practical guide showing how to implement a classic for loop (i=0; i&lt;n; i++) in x86-64 assembly with YASM. We break the for loop into init/check/update parts, convert it to while-style logic, then build it with compares, conditional jumps, inc, and unconditional jumps back to the top. Includes real working code, user input, and printed output.</p>



<p class="wp-block-paragraph">Great for students learning assembly after C/C++, OSdev hobbyists, or reverse engineering beginners.</p>



<p class="wp-block-paragraph">Introduction to For Loops in Assembly 00:00:00<br>For Loop Structure in High-Level Languages 00:00:28<br>Breaking Down For Loop Parts: Init, Check, Update 00:01:04<br>Converting For Loop to While Loop 00:01:52<br>Why While Loop Style Helps in Assembly 00:03:16<br>Program Overview and Setup 00:04:12<br>Data Section &#8211; Strings and Messages 00:04:40<br>External Functions and Hybrid Program 00:06:11<br>Entry Point &#8211; Looper Function 00:07:12<br>For Test Function and Register Usage 00:07:42<br>Preserving Callee-Saved Registers 00:08:05<br>Printing Welcome Message 00:09:00<br>Prompting User for Number 00:09:48<br>Getting User Input 00:10:25<br>For Loop Structure in Assembly &#8211; Comments 00:11:12<br>Initialization &#8211; Setting Counter to Zero 00:12:50<br>Loop Top Label and Condition Check 00:14:28<br>Conditional Jump Setup (jl) 00:15:07<br>Handling Jump Distances 00:15:34<br>Loop Body &#8211; Printing Current Number 00:16:58<br>Update Part &#8211; Increment Counter 00:18:40<br>Unconditional Jump Back to Loop Top 00:19:14<br>Loop Done Label and Exit 00:19:55<br>Printing Goodbye Message 00:20:23<br>Testing the Program 00:22:08<br>Final Results and Demo 00:22:24<br>Outro and Call to Action 00:23:25<br>Thanks and Subscribe Request 00:23:45<br>Website and QR Code Mention 00:24:38<br>Closing Thanks 00:25:16</p>



<p class="wp-block-paragraph">=-=-=-=-=-=-=-=-=</p>



<p class="wp-block-paragraph">Thanks for watching!</p>



<p class="wp-block-paragraph">Find us on other social media here:</p>



<ul class="wp-block-list">
<li>https://www.NeuralLantern.com/social</li>



<li>Twitter / X: https://x.com/NeuralLantern</li>



<li>Rumble: https://rumble.com/c/c-3696939</li>



<li>BitChute: https://www.bitchute.com/channel/pg1Pvv5dN4Gt</li>



<li>Daily Motion: https://www.dailymotion.com/neurallantern</li>



<li>Minds: https://www.minds.com/neurallantern/</li>



<li>Odysee: https://odysee.com/@NeuralLantern:5</li>
</ul>



<p class="wp-block-paragraph">Please show your support!</p>



<ul class="wp-block-list">
<li>Buy me a coffee: https://ko-fi.com/neurallantern</li>



<li>Subscribe + Sharing on Social Media</li>



<li>Leave a comment or suggestion</li>



<li>Subscribe to Blog: https://www.NeuralLantern.com</li>



<li>Watching the main &#8220;pinned&#8221; video of this channel for offers and extras</li>
</ul>



<p class="wp-block-paragraph">Hey there! In this video I&#8217;m going to teach you how to implement for loops in YASM x86-64 assembly.</p>



<p class="wp-block-paragraph">Although if you&#8217;re using a different type of machine or a different assembler,</p>



<p class="wp-block-paragraph">this video should still be useful to you because it&#8217;s mostly about the concepts involved in implementing a for loop.</p>



<p class="wp-block-paragraph">Okay, so for starters here, what am I even talking about? Let&#8217;s do…</p>



<p class="wp-block-paragraph">are you even talking about dude imagine in a higher level language we have a for loop here</p>



<p class="wp-block-paragraph">and so we have like four size type i equals zero i is less than 99 i plus plus right probably most</p>



<p class="wp-block-paragraph">programmers looking up assembly uh on the internet probably are interested in uh or probably already</p>



<p class="wp-block-paragraph">know how to implement for loops in c plus plus so let&#8217;s just pretend that you do and so inside of</p>



<p class="wp-block-paragraph">your for loop we&#8217;ll do stuff and what happens here is uh well you know this for loop is going to run</p>



<p class="wp-block-paragraph">Well, you know, this for loop is going to run 99 times.</p>



<p class="wp-block-paragraph">It&#8217;s going to start at zero.</p>



<p class="wp-block-paragraph">And, you know, so we have like an initialization part right here.</p>



<p class="wp-block-paragraph">Maybe I should copy paste this and kind of break down the parts.</p>



<p class="wp-block-paragraph">We have an init part here for the for loop.</p>



<p class="wp-block-paragraph">We&#8217;ll say init part.</p>



<p class="wp-block-paragraph">And then here we have a check part.</p>



<p class="wp-block-paragraph">We&#8217;ll continue to loop as long as this expression is true.</p>



<p class="wp-block-paragraph">You can make a big complicated expression if you want to,</p>



<p class="wp-block-paragraph">but we&#8217;ll just keep it simple for this video.</p>



<p class="wp-block-paragraph">So I&#8217;ll call this the check part.</p>



<p class="wp-block-paragraph">And then we have sort of an update or a maintenance part.</p>



<p class="wp-block-paragraph">an update or a maintenance part. So I&#8217;m going to call this the update part where we increment our</p>



<p class="wp-block-paragraph">counter variable, move pointers, even call functions, do whatever it is you think you need</p>



<p class="wp-block-paragraph">to do to update the loop so that it runs it, you know, so that the loops don&#8217;t actually have to be</p>



<p class="wp-block-paragraph">integers. But in this case, I think it&#8217;s better, it&#8217;s easier to understand what the loop is doing</p>



<p class="wp-block-paragraph">if we just kind of break down these parts. Anyway, so what is really a while loop? Sorry,</p>



<p class="wp-block-paragraph">but a while loop that breaks and has break has like a nit logic and breaking logic and checking logic just in specific places.</p>



<p class="wp-block-paragraph">Imagine this. What if I said before the loop starts, I&#8217;ll let&#8217;s let&#8217;s say we&#8217;re going to do a while loop before the loop starts.</p>



<p class="wp-block-paragraph">I&#8217;m going to initialize a variable size type I equals zero, right?</p>



<p class="wp-block-paragraph">That&#8217;s the initialization part that&#8217;ll only happen one time.</p>



<p class="wp-block-paragraph">And then when you have a while loop and it checks to see if it should keep going, that&#8217;s</p>



<p class="wp-block-paragraph">the check part of the for loop.</p>



<p class="wp-block-paragraph">So I&#8217;ll just say while i is less than 99.</p>



<p class="wp-block-paragraph">And then for the update part, we just have to stick that inside of the while loop somewhere.</p>



<p class="wp-block-paragraph">Depending on your logic, you might want to put it at the top or the middle or the bottom.</p>



<p class="wp-block-paragraph">I&#8217;m going to put it at the bottom because I&#8217;m going to expect that it happens right</p>



<p class="wp-block-paragraph">before we do the next check.</p>



<p class="wp-block-paragraph">So I&#8217;m going to maybe do a comment here and call it the update part and I&#8217;m just going</p>



<p class="wp-block-paragraph">So maybe if I update this code to print something, it&#8217;ll seem a little bit more clear.</p>



<p class="wp-block-paragraph">Value of I is, and then I&#8217;ll just say I end L, and then I&#8217;ll copy paste that to here.</p>



<p class="wp-block-paragraph">And then I can also put this inside of the while loop.</p>



<p class="wp-block-paragraph">And now we have transformed our for loop into a while loop.</p>



<p class="wp-block-paragraph">transform your for loop into a while loop it&#8217;s pretty easy to implement in assembly if you</p>



<p class="wp-block-paragraph">already know how to implement while loops so i should again say that there are lots of parts</p>



<p class="wp-block-paragraph">i don&#8217;t know if i said that during this video but there are lots of things in this video that i&#8217;m</p>



<p class="wp-block-paragraph">not going to that i&#8217;m not going to explain specifically because i&#8217;ve already explained</p>



<p class="wp-block-paragraph">them in other videos so for example implementing a while loop is in another video so if you don&#8217;t</p>



<p class="wp-block-paragraph">already know how to implement while loops if you don&#8217;t know how to use conditional branching or</p>



<p class="wp-block-paragraph">If you don&#8217;t know the basics of assembly, hybrid programs, make files, all the basic stuff that I&#8217;m going to skim over in this video,</p>



<p class="wp-block-paragraph">then you should probably check out my other videos first.</p>



<p class="wp-block-paragraph">But for now, I&#8217;m just going to assume that you know how to implement a while loop.</p>



<p class="wp-block-paragraph">And really the lesson is, hey, just take your for loop and convert it into a while loop.</p>



<p class="wp-block-paragraph">And then you can implement the while loop pretty easily.</p>



<p class="wp-block-paragraph">That&#8217;s the secret as far as I&#8217;m concerned.</p>



<p class="wp-block-paragraph">So imagine this now. Let&#8217;s do some assembly code.</p>



<p class="wp-block-paragraph">I have a source code file here called looper.asm for assembly.</p>



<p class="wp-block-paragraph">And you can imagine that I have a hybrid program running under the hood.</p>



<p class="wp-block-paragraph">I&#8217;m not going to show you all the code involved.</p>



<p class="wp-block-paragraph">I&#8217;m not going to show you the make file or the C++ driver that calls on this module.</p>



<p class="wp-block-paragraph">We&#8217;re just going to write the assembly here.</p>



<p class="wp-block-paragraph">So, you know, if you&#8217;re writing pure assembly at home to practice, that&#8217;s fine.</p>



<p class="wp-block-paragraph">Just keep in mind, there&#8217;s like a few things under the hood that I&#8217;m not showing in this specific video.</p>



<p class="wp-block-paragraph">So first off, I&#8217;m going to copy paste my data section.</p>



<p class="wp-block-paragraph">paste my data section of my assembly program. The first thing to note is we have a bunch of</p>



<p class="wp-block-paragraph">C strings here. We&#8217;re basically going to be telling the user, hey, we&#8217;re going to begin</p>



<p class="wp-block-paragraph">the four tests. Maybe I should have capitalized for, I&#8217;ll leave it. And then we&#8217;re going to prompt</p>



<p class="wp-block-paragraph">the user for a number. We&#8217;re going to say, please enter a number. The loop will print from zero to</p>



<p class="wp-block-paragraph">the number minus one, which is like the typical four loop that you usually write in the most</p>



<p class="wp-block-paragraph">and then we&#8217;re going to have a little prefix we&#8217;re going to say you know like an arrow and then we&#8217;re</p>



<p class="wp-block-paragraph">going to print the number back to the user that we&#8217;re looping through so if the user enters a</p>



<p class="wp-block-paragraph">10 it&#8217;s going to print the arrow 0 and then arrow 1 arrow 2 all the way up to arrow 9</p>



<p class="wp-block-paragraph">and then when we&#8217;re done we&#8217;re going to print an ending message so this is nothing new if you know</p>



<p class="wp-block-paragraph">assembly already just c strings that will print with system calls see my other videos if you don&#8217;t</p>



<p class="wp-block-paragraph">And then a CRLF string, just basically doing a new line, a carriage return new line feed</p>



<p class="wp-block-paragraph">on the system.</p>



<p class="wp-block-paragraph">And then we&#8217;re going to output using system call code one.</p>



<p class="wp-block-paragraph">And we&#8217;re going to use file descriptor one so we can print to standard output.</p>



<p class="wp-block-paragraph">Okay.</p>



<p class="wp-block-paragraph">So now the real fun begins.</p>



<p class="wp-block-paragraph">Let&#8217;s start our text section, which is where the instructions of our assembly program go.</p>



<p class="wp-block-paragraph">So I&#8217;m going to do text section, section text right there.</p>



<p class="wp-block-paragraph">And I&#8217;m going to use two external functions to just help me input and output numbers to the user.</p>



<p class="wp-block-paragraph">If you wanted to, you could use a system call that just inputted a character.</p>



<p class="wp-block-paragraph">And then you could just kind of like loop printing various characters.</p>



<p class="wp-block-paragraph">And like, let&#8217;s say if the user typed A, maybe you could imagine doing a loop that increases the character that they typed all the way until it hits Z.</p>



<p class="wp-block-paragraph">Or if they hit, you know, F, it&#8217;ll just print F all the way to Z.</p>



<p class="wp-block-paragraph">to z you could do that without using an external library for printing integers this video is not</p>



<p class="wp-block-paragraph">about this library right here so i&#8217;m not really going to go over it but uh you know you could</p>



<p class="wp-block-paragraph">hard code the start and end points when you&#8217;re practicing um you could you could use a different</p>



<p class="wp-block-paragraph">library or a different function call to get the inputs you could use a system call just to input</p>



<p class="wp-block-paragraph">one character um or you could you know use a hybrid program to to utilize printf and scanf</p>



<p class="wp-block-paragraph">f. Either way I&#8217;m just going to be using these two functions just to like get input and output.</p>



<p class="wp-block-paragraph">It&#8217;s not really part of the idea of looping. So now let&#8217;s start our entry point.</p>



<p class="wp-block-paragraph">Our function is called looper. Since this is a hybrid program you can imagine there&#8217;s a C++</p>



<p class="wp-block-paragraph">module elsewhere calling on the looper function and so that&#8217;s why I mark it as global so it can</p>



<p class="wp-block-paragraph">be called upon. And then I have another function called for test. I don&#8217;t really know why I chose</p>



<p class="wp-block-paragraph">it this way but i wanted to make another function that was called upon by our entry point here</p>



<p class="wp-block-paragraph">so the looper function really doesn&#8217;t do anything except recall the for test function</p>



<p class="wp-block-paragraph">so now let&#8217;s start the for test function actually maybe this is where the fun begins</p>



<p class="wp-block-paragraph">so i&#8217;m gonna put it down here and so you can see the signature it doesn&#8217;t take any arguments it</p>



<p class="wp-block-paragraph">doesn&#8217;t return anything it just does stuff and then i have a note to myself this is how we&#8217;re</p>



<p class="wp-block-paragraph">going to use the registers we&#8217;re going to use r12 for the user&#8217;s number and then we&#8217;re going to use</p>



<p class="wp-block-paragraph">And then we&#8217;re going to use R13 to keep track of where we&#8217;re going.</p>



<p class="wp-block-paragraph">So let&#8217;s see.</p>



<p class="wp-block-paragraph">I&#8217;m going to start by saying let&#8217;s preserve R12 and R13</p>



<p class="wp-block-paragraph">because you have to respect the application binary interface, the ABI,</p>



<p class="wp-block-paragraph">and that designates R12 and R13 as Kali saved registers.</p>



<p class="wp-block-paragraph">If I don&#8217;t preserve those and my program is even a little bit complicated,</p>



<p class="wp-block-paragraph">I&#8217;m probably going to be debugging forever</p>



<p class="wp-block-paragraph">debugging forever or I&#8217;m going to just crash my program for no reason. So I&#8217;m going to just</p>



<p class="wp-block-paragraph">do a push pop pair. Notice how the pops are in reverse order. This is not a push pop video,</p>



<p class="wp-block-paragraph">but just so you know, I guess while I&#8217;m here, I&#8217;m going to copy paste my crlf function,</p>



<p class="wp-block-paragraph">which really does nothing. It just prints out the crlf string with a system call. That&#8217;s all</p>



<p class="wp-block-paragraph">Okay, so do I even need CRLF in this program?</p>



<p class="wp-block-paragraph">I think I just modified this.</p>



<p class="wp-block-paragraph">Maybe I don&#8217;t even need it anymore.</p>



<p class="wp-block-paragraph">No, I guess I do.</p>



<p class="wp-block-paragraph">The first thing we&#8217;ll do is we&#8217;ll print an introduction message to the user.</p>



<p class="wp-block-paragraph">So inside of the for test, we&#8217;ll just use a system call to print out, you know, a welcome</p>



<p class="wp-block-paragraph">message to the user.</p>



<p class="wp-block-paragraph">And then I&#8217;m going to call CRLF, which will just give us a new line.</p>



<p class="wp-block-paragraph">And yeah, you can hard code, you know, the 13, 10 at the end of these strings, but I</p>



<p class="wp-block-paragraph">don&#8217;t really like doing that.</p>



<p class="wp-block-paragraph">doing that. Okay, so we should have a working program at this point. Let me see if it actually</p>



<p class="wp-block-paragraph">does work. Clear and make run. Okay, so the driver prints a little welcome message. You don&#8217;t see the</p>



<p class="wp-block-paragraph">driver code, but that&#8217;s what it&#8217;s doing. And then the for test prints the welcome message that we</p>



<p class="wp-block-paragraph">just added. And then the driver lets us know it&#8217;s retained control. And then it&#8217;s responsible for</p>



<p class="wp-block-paragraph">returning to the operating system for us. Okay, so then the next thing we&#8217;re going to do is we&#8217;re</p>



<p class="wp-block-paragraph">we&#8217;re going to ask the user for a number so that we know how many times to loop.</p>



<p class="wp-block-paragraph">And again, you could hard code this number if you don&#8217;t want to do IO right now.</p>



<p class="wp-block-paragraph">You could even print a character a certain number of times</p>



<p class="wp-block-paragraph">if you don&#8217;t want to even deal with printing an integer.</p>



<p class="wp-block-paragraph">But I&#8217;m going to ask the user for a number.</p>



<p class="wp-block-paragraph">That&#8217;s going to be the prompt string.</p>



<p class="wp-block-paragraph">And if we run it again, now you should see it asks the user for a number.</p>



<p class="wp-block-paragraph">So it&#8217;s going to say, please enter a number.</p>



<p class="wp-block-paragraph">The loop will print from zero to N minus one.</p>



<p class="wp-block-paragraph">print from 0 to n minus 1. It doesn&#8217;t actually ask for the number though. It doesn&#8217;t actually</p>



<p class="wp-block-paragraph">I guess take the number so that&#8217;s going to be my external library that this video is not about</p>



<p class="wp-block-paragraph">where I just call a function called input assigned 64 integer and I&#8217;m going to receive that back in</p>



<p class="wp-block-paragraph">rax and I&#8217;m just going to save rax into r12. So r12 is now going to be the number that the user</p>



<p class="wp-block-paragraph">inputted and that&#8217;s why up here I have it designated as the user&#8217;s number. So really not a big deal but</p>



<p class="wp-block-paragraph">a big deal but uh you know if we run it again it&#8217;ll ask for a number and then it won&#8217;t do</p>



<p class="wp-block-paragraph">anything else it&#8217;ll just kind of quit okay so now we can implement our for loop this is going to be</p>



<p class="wp-block-paragraph">a little tricky so we&#8217;re going to start off with the initialization part remember we had several</p>



<p class="wp-block-paragraph">parts here if i just kind of drag this off to the side maybe pin it up to the top so we can see it</p>



<p class="wp-block-paragraph">aren&#8217;t we? If I move it a little bit to the side. So remember that for loop, it&#8217;s got an init part</p>



<p class="wp-block-paragraph">and a check part and an update part. And I&#8217;ve kind of added that as a comment just to remind myself</p>



<p class="wp-block-paragraph">of the way my mind is supposed to be wrapped around this concept. And so I made another comment</p>



<p class="wp-block-paragraph">here with four and then empty parentheses just to denote that some comments that come below</p>



<p class="wp-block-paragraph">I guess the top of the for loop</p>



<p class="wp-block-paragraph">So now I&#8217;m going to make a label here and what I like to do with my labels is I like to</p>



<p class="wp-block-paragraph">prefix them with the name of the function that I&#8217;m currently in and then an underscore and that kind of helps me keep track of</p>



<p class="wp-block-paragraph">My symbols a little bit more easily, especially if I have a large module the symbols are less likely to overlap if I prefix them with the</p>



<p class="wp-block-paragraph">The function names</p>



<p class="wp-block-paragraph">to be Fortest underscore something and since I&#8217;m only doing one thing inside of the Fortest function</p>



<p class="wp-block-paragraph">I&#8217;m just going to have a suffix only for the most part but you can imagine if you had more</p>



<p class="wp-block-paragraph">parts inside of your function and it started getting a little cluttered you might want to have</p>



<p class="wp-block-paragraph">you know another label you know that just sort of another I guess like part to your label that names</p>



<p class="wp-block-paragraph">the part of your function you&#8217;re in although this is assembly it gets really hard really fast so</p>



<p class="wp-block-paragraph">really hard really fast so if your function is even a little bit complicated you should probably</p>



<p class="wp-block-paragraph">consider breaking it up into multiple functions if you can. We can&#8217;t really do that at this point</p>



<p class="wp-block-paragraph">because it&#8217;s just a for loop but keep that in mind. Okay so we&#8217;re going to initialize. Remember</p>



<p class="wp-block-paragraph">the first thing we had to do to initialize was you know setting i to zero or you know whatever</p>



<p class="wp-block-paragraph">it is that we&#8217;re going to set up in the init part so I&#8217;m just going to do that here. I&#8217;m going to say</p>



<p class="wp-block-paragraph">That&#8217;s the first part, the update part where we set size type i equals zero.</p>



<p class="wp-block-paragraph">In fact, maybe I could do another copy paste of this.</p>



<p class="wp-block-paragraph">Where instead of using a size type, we&#8217;ll just say that the register r13 equals zero.</p>



<p class="wp-block-paragraph">I know that&#8217;s not going to make sense in a higher level language right now,</p>



<p class="wp-block-paragraph">but just so that the for loop looks a little bit more like assembly.</p>



<p class="wp-block-paragraph">We&#8217;ll keep going as long as r13 is less than r12.</p>



<p class="wp-block-paragraph">and then we increase R13.</p>



<p class="wp-block-paragraph">So I&#8217;m just going to put ink R13</p>



<p class="wp-block-paragraph">so it looks more assembly-like,</p>



<p class="wp-block-paragraph">even though this completely and totally</p>



<p class="wp-block-paragraph">would not compile in C++.</p>



<p class="wp-block-paragraph">I hope that this helps your understanding a little bit.</p>



<p class="wp-block-paragraph">So yeah, we can do everything</p>



<p class="wp-block-paragraph">except for just the increase part at the very top.</p>



<p class="wp-block-paragraph">I&#8217;m going to choose to increase it at the bottom.</p>



<p class="wp-block-paragraph">If you wanted to, I guess you could start off R13</p>



<p class="wp-block-paragraph">as a negative number and then increase it at the top.</p>



<p class="wp-block-paragraph">But I personally don&#8217;t feel that&#8217;s like very clean.</p>



<p class="wp-block-paragraph">feel that&#8217;s like very clean it also forces you to use signed integers maybe you wanted to use an</p>



<p class="wp-block-paragraph">unsigned integer so you could get like a gigantic um maximum number that you looped up to i don&#8217;t</p>



<p class="wp-block-paragraph">know so we&#8217;ll just initialize here and we&#8217;ll say r13 is equal to zero the init part should not be</p>



<p class="wp-block-paragraph">part of the actual like looping like every time you loop up to the top of the for loop you should</p>



<p class="wp-block-paragraph">not repeat that part again it should only happen once so the next label that i have is called loop</p>



<p class="wp-block-paragraph">have is called loop top and that&#8217;s just going to be the top of the loop that I</p>



<p class="wp-block-paragraph">continue to go back up to every time I want to see if we&#8217;re supposed to</p>



<p class="wp-block-paragraph">continue looping and then go into the loops body so maybe I should say that&#8217;s</p>



<p class="wp-block-paragraph">why this is named to underscore loop top and I don&#8217;t know you don&#8217;t have to do</p>



<p class="wp-block-paragraph">camel casing and your labels you know you could just do loop in it or whatever</p>



<p class="wp-block-paragraph">but I&#8217;m just choosing to do it this way so at the top of our loop we&#8217;ll be</p>



<p class="wp-block-paragraph">Remember that was the check part, right?</p>



<p class="wp-block-paragraph">So we&#8217;re going to check to see that R13 is still less than R12.</p>



<p class="wp-block-paragraph">If it is, we&#8217;ll continue with the for loop.</p>



<p class="wp-block-paragraph">If it&#8217;s not, then we jump out of the for loop.</p>



<p class="wp-block-paragraph">So that means probably the true case where R13 is indeed less than R12,</p>



<p class="wp-block-paragraph">that&#8217;s going to be a short jump just into the loop&#8217;s body.</p>



<p class="wp-block-paragraph">And the false case where R13 is not less than R12,</p>



<p class="wp-block-paragraph">that should probably end up being a much longer jump.</p>



<p class="wp-block-paragraph">on how big your your loop is maybe that jump is too long too far away for a conditional branching</p>



<p class="wp-block-paragraph">instruction to reach if you&#8217;ve watched my previous videos you should know already that</p>



<p class="wp-block-paragraph">the conditional branching instructions like jl like jump less than they can only reach about 128</p>



<p class="wp-block-paragraph">bytes away if you try to go further than that the assembler will actually stop and block you from</p>



<p class="wp-block-paragraph">finishing your compilation it&#8217;ll say i think it&#8217;s like jump out of range or something like that</p>



<p class="wp-block-paragraph">So you want to try to keep the short jump points with your conditional branches.</p>



<p class="wp-block-paragraph">And then in the false case, where the conditional branch doesn&#8217;t actually do anything,</p>



<p class="wp-block-paragraph">then it falls through to the next instruction where you will have an unconditional jump.</p>



<p class="wp-block-paragraph">And remember, the unconditional jumps, they don&#8217;t have a limitation of 128 bytes.</p>



<p class="wp-block-paragraph">They can jump like all over the place.</p>



<p class="wp-block-paragraph">Like they can jump anywhere, basically.</p>



<p class="wp-block-paragraph">that means if you think about it, we come in to the loop top right here.</p>



<p class="wp-block-paragraph">We immediately do a compare instruction and a conditional branch.</p>



<p class="wp-block-paragraph">So if R13 is less than R12, meaning we should continue to for loop,</p>



<p class="wp-block-paragraph">then we&#8217;ll just do a short jump into the loop&#8217;s body and actually execute its body.</p>



<p class="wp-block-paragraph">And if not, we will end up falling through to line 92,</p>



<p class="wp-block-paragraph">where there&#8217;s just an unconditional jump instruction that just says,</p>



<p class="wp-block-paragraph">all right, let&#8217;s jump all the way down to being done.</p>



<p class="wp-block-paragraph">Let&#8217;s jump all the way down to being done, which could be very far away for all we know.</p>



<p class="wp-block-paragraph">Okay, so we&#8217;ve done that.</p>



<p class="wp-block-paragraph">Now let&#8217;s implement the loops body because the first thing that we did is we wanted to</p>



<p class="wp-block-paragraph">jump into the loop body to actually execute our instructions, which in this case, we&#8217;ll</p>



<p class="wp-block-paragraph">just be, you know, printing a number every time we loop and then increasing that number.</p>



<p class="wp-block-paragraph">So I&#8217;m going to do a little like new line there.</p>



<p class="wp-block-paragraph">I&#8217;m going to paste the loop body.</p>



<p class="wp-block-paragraph">little comments to help remind myself that this is actually the loop&#8217;s body. So for test loop body</p>



<p class="wp-block-paragraph">that takes care of the branching instruction, hitting on that and actually going into the body.</p>



<p class="wp-block-paragraph">And then later we&#8217;re going to have to implement a label for the loop being done. But for now,</p>



<p class="wp-block-paragraph">we&#8217;ll just say the body. What does it do? It just prints a little message to the user.</p>



<p class="wp-block-paragraph">If you look at the message for current number string, if I go up real fast,</p>



<p class="wp-block-paragraph">message for current number, it&#8217;s just an arrow. So the user&#8217;s going to see an arrow and then</p>



<p class="wp-block-paragraph">So the user is going to see an arrow and then their current number, I guess of the loop&#8217;s</p>



<p class="wp-block-paragraph">current number.</p>



<p class="wp-block-paragraph">And then every time it loops, it&#8217;s just going to continue printing that arrow with a number</p>



<p class="wp-block-paragraph">on it.</p>



<p class="wp-block-paragraph">So we&#8217;re doing that.</p>



<p class="wp-block-paragraph">And then we&#8217;re going to say R13, which is the current counter variable, which started</p>



<p class="wp-block-paragraph">at zero is going to get loaded into RDI, which if you watched my other videos, it&#8217;s just</p>



<p class="wp-block-paragraph">the first integer argument for a function call.</p>



<p class="wp-block-paragraph">So I&#8217;m just going to call this other function here, which is not part of the video to just</p>



<p class="wp-block-paragraph">which is not part of the video to just say hey please print this number for me so the first</p>



<p class="wp-block-paragraph">time this iterates it&#8217;s going to print zero because it&#8217;s going to print r13 and then it&#8217;s</p>



<p class="wp-block-paragraph">going to print a new line so that the cursor goes to the next you know line of the terminal</p>



<p class="wp-block-paragraph">so that&#8217;s all the body does it just kind of like prints the current number with an arrow and does</p>



<p class="wp-block-paragraph">a new line and then at the very bottom of the loop body we just sort of maintain the for loop this is</p>



<p class="wp-block-paragraph">for loop this is going to be the update part so like let&#8217;s see maybe scooch this up a little bit</p>



<p class="wp-block-paragraph">the update part where we have let&#8217;s see on the very right side of the for loop which is like i</p>



<p class="wp-block-paragraph">plus plus or in more assembly speak increasing the counter variable so i&#8217;m just going to increase r13</p>



<p class="wp-block-paragraph">and then that way the loop can progress you know we&#8217;re always looking at r13</p>



<p class="wp-block-paragraph">to decide if we need to stop or not you know we&#8217;re comparing r13 to r12</p>



<p class="wp-block-paragraph">So we&#8217;re just increasing at the very bottom of the loop and then we unconditionally jump back up to the top.</p>



<p class="wp-block-paragraph">Probably a better idea to unconditionally jump back up to the top because maybe the jump to the top is very very far and if it&#8217;s greater than 128 bytes it won&#8217;t work.</p>



<p class="wp-block-paragraph">So the regular jump instruction doesn&#8217;t have that limitation. So now we&#8217;re jumping up to the loop top.</p>



<p class="wp-block-paragraph">So you can imagine now that you know we&#8217;re not going to the initialization part. That would be bad.</p>



<p class="wp-block-paragraph">We&#8217;re just jumping up to the top here where we immediately ask you know are we done?</p>



<p class="wp-block-paragraph">If we&#8217;re not done, we jump into the loop body and print another number.</p>



<p class="wp-block-paragraph">And then at the very bottom of the body, we say, all right, increase the counter and then jump back up to the top.</p>



<p class="wp-block-paragraph">So this is a simple for loop, but you can see what it&#8217;s doing, right?</p>



<p class="wp-block-paragraph">It&#8217;s just going to be printing a number over and over again as the number increases.</p>



<p class="wp-block-paragraph">And then eventually it&#8217;ll stop when it hits the correct number.</p>



<p class="wp-block-paragraph">The last thing we need is the loop done label.</p>



<p class="wp-block-paragraph">If you look back up at the top here on line 92, if R13 was not less than R12,</p>



<p class="wp-block-paragraph">less than r12 then execution would fall through to line 92 and there is our unconditional jump</p>



<p class="wp-block-paragraph">instruction basically saying if r13 is not less than r12 then we&#8217;ll jump to the loop done label</p>



<p class="wp-block-paragraph">which means we&#8217;re just totally finished with this loop so we have to make that real fast</p>



<p class="wp-block-paragraph">and all it&#8217;s going to do is just basically say goodbye it&#8217;s just going to print a message to</p>



<p class="wp-block-paragraph">to the restoration functions.</p>



<p class="wp-block-paragraph">Oh, did I ruin my return somewhere?</p>



<p class="wp-block-paragraph">Uh-oh, what did I do wrong?</p>



<p class="wp-block-paragraph">I lost my return statement.</p>



<p class="wp-block-paragraph">Did I accidentally delete that somehow?</p>



<p class="wp-block-paragraph">That&#8217;s a bad program.</p>



<p class="wp-block-paragraph">Or did I not even…</p>



<p class="wp-block-paragraph">Hmm, I wonder if it like…</p>



<p class="wp-block-paragraph">I wonder if I didn&#8217;t have my return statement</p>



<p class="wp-block-paragraph">and it fell through into the CRLF function</p>



<p class="wp-block-paragraph">and then the CRLF function returned to the caller</p>



<p class="wp-block-paragraph">to the caller on behalf of the for test function I don&#8217;t even know only all only</p>



<p class="wp-block-paragraph">the spirits know at this point I don&#8217;t know leave a comment or something if</p>



<p class="wp-block-paragraph">you know what happened but every function has to have its own return for</p>



<p class="wp-block-paragraph">sure so you know the loop done label is usually where you want to jump to when</p>



<p class="wp-block-paragraph">you know the for loop is finished or the while loop is finished when it comes to</p>



<p class="wp-block-paragraph">saying goodbye it probably would be a little bit more clear of me to add an</p>



<p class="wp-block-paragraph">you know for test you know say goodbye just so that I that I remember that this</p>



<p class="wp-block-paragraph">is this is the place where we&#8217;re done and this other place this is just</p>



<p class="wp-block-paragraph">something else that&#8217;s happening maybe I&#8217;m doing more instructions or more</p>



<p class="wp-block-paragraph">operations or calling a function or whatever so obviously if I did it this</p>



<p class="wp-block-paragraph">way then the loop done label would just end up falling through to the goodbye</p>



<p class="wp-block-paragraph">label and it would be fine but it&#8217;s just more visually clear I&#8217;m gonna take it</p>



<p class="wp-block-paragraph">Anyway, so at this point we might have a program that actually works.</p>



<p class="wp-block-paragraph">Let&#8217;s see if it does.</p>



<p class="wp-block-paragraph">What else do I need to add?</p>



<p class="wp-block-paragraph">No, I think we&#8217;re done with that.</p>



<p class="wp-block-paragraph">Okay, let&#8217;s try it.</p>



<p class="wp-block-paragraph">So we&#8217;ll do a make run and we&#8217;ll enter the number five and let&#8217;s see if it works or it</p>



<p class="wp-block-paragraph">crashes.</p>



<p class="wp-block-paragraph">It worked on the first try.</p>



<p class="wp-block-paragraph">So I had a solution though.</p>



<p class="wp-block-paragraph">Not fair, but I could have typoed.</p>



<p class="wp-block-paragraph">Anyway, so it says we entered a five, the loop will print from zero to N minus one.</p>



<p class="wp-block-paragraph">print from zero to n minus one so we should see from zero to four and so then every iteration of</p>



<p class="wp-block-paragraph">the loop it&#8217;s just that little message we&#8217;re just printing a zero printing one printing a two you</p>



<p class="wp-block-paragraph">know the number increases because we did did that little inc instruction the increase instruction</p>



<p class="wp-block-paragraph">we unconditionally jump to the top of the loop where we decide if we&#8217;re supposed to uh finish</p>



<p class="wp-block-paragraph">you know be done with the loop by jumping to the done label eventually after we uh let&#8217;s see</p>



<p class="wp-block-paragraph">it prints this four here it&#8217;ll do the increase instruction at the bottom of the loop&#8217;s body</p>



<p class="wp-block-paragraph">and then it&#8217;ll jump to the loop&#8217;s top then the loop&#8217;s top will see that it&#8217;s a five because we</p>



<p class="wp-block-paragraph">just increased the four it will see that five is definitely not less than five so that&#8217;s a false</p>



<p class="wp-block-paragraph">which means execution will you know fall through where the heck is that it&#8217;ll fall through to the</p>



<p class="wp-block-paragraph">line 92 jump instruction which is just the loop being done so that&#8217;s here where it says goodbye</p>



<p class="wp-block-paragraph">says goodbye and then we have successfully implemented a basic for loop</p>



<p class="wp-block-paragraph">all right so thank you so much for watching this video I hope you learned</p>



<p class="wp-block-paragraph">a little bit and had a little bit of fun I will see you in the next video happy</p>



<p class="wp-block-paragraph">coding and happy studying hey everybody thanks for watching this video again</p>



<p class="wp-block-paragraph">from the bottom of my heart I really appreciate it I do hope you did learn</p>



<p class="wp-block-paragraph">hope you did learn something and have some fun. If you could do me a please, a small little favor,</p>



<p class="wp-block-paragraph">could you please subscribe and follow this channel or these videos or whatever it is you do on the</p>



<p class="wp-block-paragraph">current social media website that you&#8217;re looking at right now. It would really mean the world to</p>



<p class="wp-block-paragraph">me and it&#8217;ll help make more videos and grow this community. So we&#8217;ll be able to do more videos,</p>



<p class="wp-block-paragraph">longer videos, better videos, or just I&#8217;ll be able to keep making videos in general. So please</p>



<p class="wp-block-paragraph">and subscribe. You know sometimes I&#8217;m sleeping in the middle of the night and I just wake up because</p>



<p class="wp-block-paragraph">I know somebody subscribed or followed. It just wakes me up and I get filled with joy. That&#8217;s</p>



<p class="wp-block-paragraph">exactly what happens every single time. So you could do it as a nice favor to me or you could</p>



<p class="wp-block-paragraph">you could troll me if you want to just wake me up in the middle of the night just subscribe</p>



<p class="wp-block-paragraph">and then I&#8217;ll just wake up. I promise that&#8217;s what will happen. Also if you look at the middle of the</p>



<p class="wp-block-paragraph">screen right now you should see a QR code which you can scan in order to go to the website which</p>



<p class="wp-block-paragraph">at the bottom of this video and it&#8217;ll take you to my main website where you can just kind of like</p>



<p class="wp-block-paragraph">see all the videos I published and the services and tutorials and things that I offer and all</p>



<p class="wp-block-paragraph">that good stuff and if you have a suggestion for clarifications or errata or just future videos</p>



<p class="wp-block-paragraph">that you want to see please leave a comment or if you just want to say hey what&#8217;s up what&#8217;s going on</p>



<p class="wp-block-paragraph">you know just send me a comment whatever I also wake up for those in the middle of the night I get</p>



<p class="wp-block-paragraph">I wake up in a cold sweat and I&#8217;m like,</p>



<p class="wp-block-paragraph">it would really mean the world to me.</p>



<p class="wp-block-paragraph">I would really appreciate it.</p>



<p class="wp-block-paragraph">So again, thank you so much for watching this video</p>



<p class="wp-block-paragraph">and enjoy the cool music as I fade into the darkness,</p>



<p class="wp-block-paragraph">which is coming for us all.</p>



<p class="wp-block-paragraph">Thank you.</p>
<p>The post <a href="https://www.NeuralLantern.com/x86-64-assembly-for-loops-explained-yasm-tutorial/">x86-64 Assembly For Loops Explained &#8211; YASM Tutorial</a> appeared first on <a href="https://www.NeuralLantern.com">NeuralLantern.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.NeuralLantern.com/x86-64-assembly-for-loops-explained-yasm-tutorial/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>x86-64 Assembly: Signed Integer Multiplication and Addition with IMUL &#038; ADD (YASM on Ubuntu Linux)</title>
		<link>https://www.NeuralLantern.com/x86-64-assembly-signed-integer-multiplication-and-addition-with-imul-add-yasm-on-ubuntu-linux/</link>
					<comments>https://www.NeuralLantern.com/x86-64-assembly-signed-integer-multiplication-and-addition-with-imul-add-yasm-on-ubuntu-linux/#respond</comments>
		
		<dc:creator><![CDATA[mike]]></dc:creator>
		<pubDate>Sun, 30 Nov 2025 07:30:56 +0000</pubDate>
				<category><![CDATA[Assembly Language]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Videos]]></category>
		<category><![CDATA[assembly arithmetic]]></category>
		<category><![CDATA[assembly language programming]]></category>
		<category><![CDATA[cpu registers assembly]]></category>
		<category><![CDATA[imul instruction]]></category>
		<category><![CDATA[intel imul]]></category>
		<category><![CDATA[low level programming]]></category>
		<category><![CDATA[nasm imul]]></category>
		<category><![CDATA[reverse engineering basics]]></category>
		<category><![CDATA[signed multiplication assembly]]></category>
		<category><![CDATA[systems programming]]></category>
		<category><![CDATA[ubuntu assembly]]></category>
		<category><![CDATA[x86_64 tutorial]]></category>
		<category><![CDATA[x86-64 assembly]]></category>
		<category><![CDATA[x86-64 multiplication]]></category>
		<category><![CDATA[Yasm tutorial]]></category>
		<guid isPermaLink="false">https://www.NeuralLantern.com/?p=259</guid>

					<description><![CDATA[<p>Hands-on x86-64 assembly tutorial showing how to perform signed integer multiplication using the IMUL instruction in YASM/NASM on Linux. Covers immediate and global operands, two/three-operand forms, basic addition, with complete working code and live execution.</p>
<p>The post <a href="https://www.NeuralLantern.com/x86-64-assembly-signed-integer-multiplication-and-addition-with-imul-add-yasm-on-ubuntu-linux/">x86-64 Assembly: Signed Integer Multiplication and Addition with IMUL &amp; ADD (YASM on Ubuntu Linux)</a> appeared first on <a href="https://www.NeuralLantern.com">NeuralLantern.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe title="x86-64 Assembly: Signed Integer Multiplication and Addition with IMUL &amp; ADD (YASM on Ubuntu Linux)" width="1380" height="776" src="https://www.youtube.com/embed/QmIdCYsxTTM?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<p class="wp-block-paragraph">Want to actually understand how signed integer multiplication works at the CPU level? In this straight-to-the-point x86-64 assembly tutorial we dive into the IMUL instruction &#8211; the proper way to multiply signed integers in YASM/NASM on Linux.</p>



<p class="wp-block-paragraph">We cover:</p>



<ul class="wp-block-list">
<li>The difference between unsigned (MUL) and signed (IMUL) multiplication</li>



<li>Two-operand vs three-operand IMUL forms</li>



<li>Multiplying immediate values vs global variables</li>



<li>Loading values into registers (mov) and performing fast multiplication</li>



<li>Basic addition with ADD and INC</li>



<li>Full working example that prints results so you can see it in action</li>



<li>Why you should respect the ABI and save callee-saved registers (R12-R15)</li>
</ul>



<p class="wp-block-paragraph">Everything is built with YASM on Ubuntu, linked with a tiny C driver, and run instantly. No fluff, just real assembly code you can copy and run right now.</p>



<p class="wp-block-paragraph">Code on screen, calculator verification, and clear explanation of every line. Perfect if you&#8217;re learning low-level programming, reverse engineering, or just want to know what really happens when you write a = b * c; in C.</p>



<p class="wp-block-paragraph">Introduction to Integer Arithmetic 00:00:00<br>Recommended Book and Resources 00:00:39<br>Instruction Set Overview 00:01:17<br>Addition Instruction (ADD) 00:01:43<br>Unsigned vs Signed Multiplication 00:02:20<br>Signed Multiplication with IMUL 00:03:05<br>IMUL Three-Operand Form 00:03:40<br>IMUL Two-Operand Form 00:04:12<br>Squaring with IMUL 00:04:50<br>Setting Up the Sample Program 00:05:08<br>Data Section and Strings 00:06:13<br>Text Section and External Functions 00:06:58<br>Math Function Entry Point 00:08:01<br>Multiply Test Function Setup 00:08:42<br>Multiplying Immediate Values 00:09:48<br>Printing the Immediate Result 00:10:21<br>Running and Verifying Immediates 00:12:53<br>Multiplying Global Variables 00:13:49<br>Loading Globals into Registers 00:14:07<br>IMUL with Globals Demo 00:14:37<br>Addition with INC and ADD 00:15:36<br>Final Results and Verification 00:17:09<br>Wrap-Up and Closing 00:17:22<br>Outro and Subscribe Request 00:17:44</p>



<p class="wp-block-paragraph">Thanks for watching!</p>



<p class="wp-block-paragraph">Find us on other social media here:</p>



<ul class="wp-block-list">
<li>https://www.NeuralLantern.com/social</li>
</ul>



<p class="wp-block-paragraph">Please help support us!</p>



<ul class="wp-block-list">
<li>Subscribing + Sharing on Social Media</li>



<li>Leaving a comment or suggestion</li>



<li>Subscribing to our Blog</li>



<li>Watching the main &#8220;pinned&#8221; video of this channel for offers and extras</li>
</ul>



<p class="wp-block-paragraph">okay</p>



<p class="wp-block-paragraph">hey everybody in this video i&#8217;d like to talk to you a little bit about</p>



<p class="wp-block-paragraph">integer arithmetic in yasm assembly on an x86-64 system</p>



<p class="wp-block-paragraph">so what am i talking about well integer arithmetic i want to take integers and i want to add them</p>



<p class="wp-block-paragraph">together multiply them together whatever this video is mostly going to focus on signed integer</p>



<p class="wp-block-paragraph">but I&#8217;m going to briefly skim through unsigned integer multiplication and also</p>



<p class="wp-block-paragraph">addition and anyway so for starters let me go up to this the top of this book</p>



<p class="wp-block-paragraph">here that I&#8217;ve got I&#8217;m going to show you pages from a book that I really really</p>



<p class="wp-block-paragraph">love I mentioned it in a lot of my other videos it&#8217;s called x86 64 assembly</p>



<p class="wp-block-paragraph">language programming with Ubuntu and it is written by a brilliant doctor</p>



<p class="wp-block-paragraph">professor who is just interested in everyone learning this is an open source</p>



<p class="wp-block-paragraph">you can get yourself a copy for free just look that title and name up you can find his website</p>



<p class="wp-block-paragraph">you can grab a copy and you too can become an assembly expert just by reading this book</p>



<p class="wp-block-paragraph">honestly this book has everything that you really need to to really level yourself off</p>



<p class="wp-block-paragraph">level yourself up well beyond i think the master&#8217;s level of college probably</p>



<p class="wp-block-paragraph">not as much as the person who wrote the book but you never know anyway let me uh</p>



<p class="wp-block-paragraph">I want to go down to section 7 here and it&#8217;s called instruction set overview.</p>



<p class="wp-block-paragraph">So here you can have like an overview of like all different types of instructions, but I&#8217;m</p>



<p class="wp-block-paragraph">going to focus on the integer arithmetic instructions.</p>



<p class="wp-block-paragraph">So I&#8217;m going to go to 7.5.</p>



<p class="wp-block-paragraph">Notice how the first section in here is addition.</p>



<p class="wp-block-paragraph">I&#8217;m not going to give you an addition example because it&#8217;s just too easy.</p>



<p class="wp-block-paragraph">You pretty much use just use the add instruction and then you have a source and destination</p>



<p class="wp-block-paragraph">comma source in x86 yasm assembly it&#8217;s pretty much the destination is the first operand so uh</p>



<p class="wp-block-paragraph">that&#8217;s kind of implied usually when you have just like a two operand instruction now we could add</p>



<p class="wp-block-paragraph">using three operands and the the first one would be the destination and then the other two would</p>



<p class="wp-block-paragraph">be the sources but i&#8217;m going to scroll down past that to the integer multiplication section 7.5.3</p>



<p class="wp-block-paragraph">unsigned multiplication is a little tricky and</p>



<p class="wp-block-paragraph">You kind of have to decide what data size you&#8217;re going to go with and then you use the instruction</p>



<p class="wp-block-paragraph">uh, and then you end up with some some uh, some answers that are spread across multiple registers</p>



<p class="wp-block-paragraph">I&#8217;m going to eventually make other videos where I can talk to you about how to manipulate multiple registers or at least know that they&#8217;re there like</p>



<p class="wp-block-paragraph">not 64-bit registers so if we were clever we could just sort of manipulate those so that</p>



<p class="wp-block-paragraph">the whole answer showed up on one single 64-bit register if we wanted to but just know you can</p>



<p class="wp-block-paragraph">multiply unsigned integers it&#8217;s a little bit more complicated than signed integers so in this video</p>



<p class="wp-block-paragraph">i&#8217;m just going to talk about signed integers let&#8217;s see so signed integer multiplication</p>



<p class="wp-block-paragraph">so in order that&#8217;s a section 7.5.3.2 if you want to multiply two integers and they&#8217;re signed</p>



<p class="wp-block-paragraph">and they&#8217;re signed meaning they have a plus or a minus sign meaning they&#8217;re designated as either</p>



<p class="wp-block-paragraph">positive or negative rather than not designated at all which would usually just mean positive</p>



<p class="wp-block-paragraph">you can use imall as an instruction and well you can just provide you know one operand two operands</p>



<p class="wp-block-paragraph">or three operands let&#8217;s do the three operand version first because that&#8217;s probably the easiest</p>



<p class="wp-block-paragraph">So we would take a number that&#8217;s sitting in a register and then we would multiply it by some immediate.</p>



<p class="wp-block-paragraph">Notice how IMM is sitting here.</p>



<p class="wp-block-paragraph">The result of multiplying a register by some number would just go into the destination operand.</p>



<p class="wp-block-paragraph">So that means you&#8217;d put a register here.</p>



<p class="wp-block-paragraph">You&#8217;d put a register here.</p>



<p class="wp-block-paragraph">You&#8217;d put an immediate here in one instruction.</p>



<p class="wp-block-paragraph">Then you&#8217;d have some sort of an answer on what these two numbers were multiplied against each other.</p>



<p class="wp-block-paragraph">then you&#8217;re allowed to specify a register for the destination and a register for the source.</p>



<p class="wp-block-paragraph">But notice how the destination gets overwritten here.</p>



<p class="wp-block-paragraph">So, you know, it&#8217;s going to multiply this number by this number</p>



<p class="wp-block-paragraph">and then just store the result in the first register.</p>



<p class="wp-block-paragraph">So you will kind of overwrite something.</p>



<p class="wp-block-paragraph">It&#8217;s maybe more convenient for you to use the three operand version</p>



<p class="wp-block-paragraph">if you only want to multiply by an immediate.</p>



<p class="wp-block-paragraph">But, you know, anyway, and then for the, let&#8217;s see, let&#8217;s see, I think you can square a number</p>



<p class="wp-block-paragraph">just by specifying its source here.</p>



<p class="wp-block-paragraph">It&#8217;ll multiply a number by itself.</p>



<p class="wp-block-paragraph">And then let me just go down a little bit.</p>



<p class="wp-block-paragraph">I&#8217;m starting to get lost in this book.</p>



<p class="wp-block-paragraph">Let me go down a little bit.</p>



<p class="wp-block-paragraph">Well, I guess that&#8217;s all we really had to say.</p>



<p class="wp-block-paragraph">Okay, so let me show you a sample program that I&#8217;ve prepared.</p>



<p class="wp-block-paragraph">that I&#8217;ve prepared so that we can multiply. Okay, sample program. I think I need to rehearse myself</p>



<p class="wp-block-paragraph">a little bit more before I record videos. Anyway, I&#8217;ve got this empty source code file here. Keep in</p>



<p class="wp-block-paragraph">mind that I don&#8217;t need that. Keep in mind that I have a sample program here already. I&#8217;m not going</p>



<p class="wp-block-paragraph">to really focus on the contents of it because this is not what did I do wrong here? Main and math.</p>



<p class="wp-block-paragraph">main empty no no where&#8217;s my make file oh I forgot to open it this is not a video</p>



<p class="wp-block-paragraph">about make files or hybrid programs or anything like that that&#8217;s covered in my</p>



<p class="wp-block-paragraph">other videos so I&#8217;m just gonna say hey I&#8217;ve got a make file that compiles my</p>



<p class="wp-block-paragraph">assembly source code and then I&#8217;ve got a driver C source code file which its</p>



<p class="wp-block-paragraph">entire job is just to have the main entry point because I&#8217;m linking against</p>



<p class="wp-block-paragraph">the GCC libraries and then its job is just a call on a math function which</p>



<p class="wp-block-paragraph">So now my assembly module is blank.</p>



<p class="wp-block-paragraph">What should we do?</p>



<p class="wp-block-paragraph">First I&#8217;m going to copy paste from my solution here, just a bunch of strings.</p>



<p class="wp-block-paragraph">So I&#8217;ve got a data section that I&#8217;m going to get set up.</p>



<p class="wp-block-paragraph">This is not a video about the basics of assembly programming.</p>



<p class="wp-block-paragraph">See my other videos, but for now I&#8217;m just going to say, well, I&#8217;ve got a bunch of strings.</p>



<p class="wp-block-paragraph">I&#8217;m going to say the result of multiplying immediates is this, the result of multiplying</p>



<p class="wp-block-paragraph">globals is that.</p>



<p class="wp-block-paragraph">multiplications and then see the results. Okay, so then a couple more variables</p>



<p class="wp-block-paragraph">before we&#8217;re finished is I&#8217;m gonna now say that we have a system call for</p>



<p class="wp-block-paragraph">system right which is not what this video is about. See my other videos for</p>



<p class="wp-block-paragraph">system calls. Same thing for file descriptors it&#8217;s there I&#8217;m not gonna</p>



<p class="wp-block-paragraph">explain it too much I&#8217;m just gonna print a standard output and then from this</p>



<p class="wp-block-paragraph">program we&#8217;re gonna I&#8217;m gonna return just an integer for whatever reason I&#8217;m</p>



<p class="wp-block-paragraph">for whatever reason. I&#8217;m just saving it as a variable. And then we want to multiply some</p>



<p class="wp-block-paragraph">integers. So I&#8217;m storing two integers in the global section, you know, still inside of the</p>



<p class="wp-block-paragraph">dot data section. So that&#8217;s, these are going to be global variables. They&#8217;re going to be both</p>



<p class="wp-block-paragraph">be quad words. So I can load up into a quad registers or quad word registers. And now I&#8217;m</p>



<p class="wp-block-paragraph">ready to start my text section. So the first thing that I&#8217;m going to do is just, you know,</p>



<p class="wp-block-paragraph">that&#8217;s where all of our instructions go and then I&#8217;m going to name two external</p>



<p class="wp-block-paragraph">symbols don&#8217;t worry about these symbols they are not the point of this video but</p>



<p class="wp-block-paragraph">you know I have a little library that I wrote that helps me print and and take</p>



<p class="wp-block-paragraph">input from the user I&#8217;m gonna print an integer I&#8217;m gonna take an input from the</p>



<p class="wp-block-paragraph">from the user so don&#8217;t worry about that that&#8217;s not the point of this video</p>



<p class="wp-block-paragraph">really I just want to make it so that when I demo I can just easily type in an</p>



<p class="wp-block-paragraph">and then just print it to the user.</p>



<p class="wp-block-paragraph">So let&#8217;s look at our main entry point here.</p>



<p class="wp-block-paragraph">Remember the driver calls on a function called math.</p>



<p class="wp-block-paragraph">So I&#8217;m just gonna make an entry point called math,</p>



<p class="wp-block-paragraph">mark it as global so the driver can call on it.</p>



<p class="wp-block-paragraph">And then I&#8217;m gonna, whoops, why did I put load here?</p>



<p class="wp-block-paragraph">Do, I&#8217;m gonna put, I&#8217;m gonna say do it right there.</p>



<p class="wp-block-paragraph">Let&#8217;s do it.</p>



<p class="wp-block-paragraph">I&#8217;m just gonna call on a function I wrote</p>



<p class="wp-block-paragraph">called multiply test, kind of pointless</p>



<p class="wp-block-paragraph">if you think about the fact that there&#8217;s like no code</p>



<p class="wp-block-paragraph">in the main function here.</p>



<p class="wp-block-paragraph">like no code in the main function here but that&#8217;s the way i like to do it when we&#8217;re done we&#8217;re just</p>



<p class="wp-block-paragraph">going to return our return value that&#8217;s already been defined and so now i&#8217;m ready to start setting</p>



<p class="wp-block-paragraph">up our multiply test maybe i&#8217;ll just copy paste the header here and i&#8217;ll say this is going to be</p>



<p class="wp-block-paragraph">a label called multiply test because i&#8217;m going to call on it and try to use it like a function</p>



<p class="wp-block-paragraph">i&#8217;m going to put a return instruction at the very end so now it really is a function</p>



<p class="wp-block-paragraph">I&#8217;m going to use these registers.</p>



<p class="wp-block-paragraph">So I&#8217;m going to use R12, R13, R14, and R15 to hold temporary immediates and globals</p>



<p class="wp-block-paragraph">just for multiplication.</p>



<p class="wp-block-paragraph">So I&#8217;m basically going to be using the registers to hold my data.</p>



<p class="wp-block-paragraph">And because I&#8217;m going to use all of those registers, remember you have to respect the</p>



<p class="wp-block-paragraph">ABI.</p>



<p class="wp-block-paragraph">So that means we have to have a push pop pair on all of those registers because they&#8217;re</p>



<p class="wp-block-paragraph">designated as callee saved.</p>



<p class="wp-block-paragraph">saved if anyone calls on your functions and you&#8217;re not respecting the abi then you&#8217;re probably about</p>



<p class="wp-block-paragraph">to crash the program in some way or even if you are the only person who writes any code that your</p>



<p class="wp-block-paragraph">code calls on or gets called from you&#8217;re probably still going to regret not respecting the abi</p>



<p class="wp-block-paragraph">eventually when you forget what&#8217;s going on anyway so let&#8217;s multiply some immediates first thing i&#8217;m</p>



<p class="wp-block-paragraph">and move it into R12 because that&#8217;s where we&#8217;re going to hold some temporary</p>



<p class="wp-block-paragraph">immediates and then the number 256 put that into R13 and then I&#8217;m going to use</p>



<p class="wp-block-paragraph">the I&#8217;m all instruction to just multiply those two values together because this</p>



<p class="wp-block-paragraph">is the two operand version of that instruction the result will also be</p>



<p class="wp-block-paragraph">stored in R12 so that means 233 will be erased from R12 and the answer that will</p>



<p class="wp-block-paragraph">the results for the immediate because I like my programs to be pretty. I&#8217;m not just going to print</p>



<p class="wp-block-paragraph">the numbers and then hope I can remember which number comes first. That&#8217;s usually a huge mistake</p>



<p class="wp-block-paragraph">if you&#8217;re trying to debug something even a little bit complicated. So I&#8217;m going to print my string,</p>



<p class="wp-block-paragraph">which I&#8217;m calling the immediate prefix. And if you look back up at the top right here,</p>



<p class="wp-block-paragraph">it&#8217;s just going to say the result of multiplying immediates is, and then it&#8217;s going to put three</p>



<p class="wp-block-paragraph">asterisks. And then I&#8217;m going to print the actual result. And then the suffix is just going to be</p>



<p class="wp-block-paragraph">And then the suffix is just going to be three more asterisks.</p>



<p class="wp-block-paragraph">So we should basically see the results surrounded by asterisks.</p>



<p class="wp-block-paragraph">So I&#8217;m doing that.</p>



<p class="wp-block-paragraph">And then I&#8217;m going to use my library</p>



<p class="wp-block-paragraph">to call a special printing function</p>



<p class="wp-block-paragraph">so that I can just print to the result.</p>



<p class="wp-block-paragraph">So R12 is where the result of the multiplication is.</p>



<p class="wp-block-paragraph">I&#8217;m going to give that as the first argument,</p>



<p class="wp-block-paragraph">which is the RDI register, if we&#8217;re talking about integers.</p>



<p class="wp-block-paragraph">And then I&#8217;m just going to call my function</p>



<p class="wp-block-paragraph">that&#8217;ll print for me.</p>



<p class="wp-block-paragraph">for me and then I&#8217;m going to print the suffix so the suffix is just that other</p>



<p class="wp-block-paragraph">string we talked about just it trails with asterisks I&#8217;m then going to call</p>



<p class="wp-block-paragraph">on a custom function called crlf all that&#8217;s going to do is just print a new</p>



<p class="wp-block-paragraph">line I don&#8217;t know why I do that I could easily put that into the string but it&#8217;s</p>



<p class="wp-block-paragraph">more fun to call functions although to be fair every time you call a function</p>



<p class="wp-block-paragraph">you are jumping to an instruction elsewhere and so the CPU does pay a</p>



<p class="wp-block-paragraph">trying to write programs for high performance you might not want to do that anyway so this is pretty</p>



<p class="wp-block-paragraph">fast because i&#8217;m really just using an immediate and then i&#8217;m loading it into a register i&#8217;m not</p>



<p class="wp-block-paragraph">actually touching global memory so this should be a lightning fast multiplication operation</p>



<p class="wp-block-paragraph">let&#8217;s see if this actually works if i didn&#8217;t screw this up whoops what did i what did i do there oh no</p>



<p class="wp-block-paragraph">i have too many videos now</p>



<p class="wp-block-paragraph">gosh okay clear and make run oh what have I done undefined symbols CRLF did I</p>



<p class="wp-block-paragraph">forget oh I forgot to copy paste my CRLF function yeah so again don&#8217;t worry</p>



<p class="wp-block-paragraph">about CRLF all I&#8217;m doing is just printing a new line carriage return it&#8217;s</p>



<p class="wp-block-paragraph">just you know this is from another example where I was trying to prove to</p>



<p class="wp-block-paragraph">somebody you need to preserve registers and respect the ABI so don&#8217;t even worry</p>



<p class="wp-block-paragraph">you know what I&#8217;m going to leave it as is because if I take that out then I have to take the time</p>



<p class="wp-block-paragraph">to remove the push pop pair because there&#8217;s no point at that I&#8217;m doing that if I&#8217;m not</p>



<p class="wp-block-paragraph">messing with those registers forget about that it&#8217;s not part of this video</p>



<p class="wp-block-paragraph">anyway I&#8217;m going to run the program again and you can see that the result of multiplying</p>



<p class="wp-block-paragraph">immediates is and so this whole string right here was my prefix so again not really the point of</p>



<p class="wp-block-paragraph">the point of this video and then this is the result of multiplying those two different numbers</p>



<p class="wp-block-paragraph">and then the suffix with the stars after so let me just prove this to you where&#8217;s the dang calculator</p>



<p class="wp-block-paragraph">oh man i need to work on my icons like i just did something screwy and i have like no good icons</p>



<p class="wp-block-paragraph">anymore on this virtual machine so we were going to multiply 233 by whoops by what was it 256.</p>



<p class="wp-block-paragraph">five nine six four eight and you can see that&#8217;s on the screen five nine six four eight so we have</p>



<p class="wp-block-paragraph">successfully multiplied signed integers and since they&#8217;re signed we could multiply negative numbers</p>



<p class="wp-block-paragraph">if we wanted to i&#8217;m not going to here but you can now the next thing let&#8217;s try is let&#8217;s multiply</p>



<p class="wp-block-paragraph">stuff sitting in global memory okay so i&#8217;m just going to copy this um where the heck is it</p>



<p class="wp-block-paragraph">at the top we made two global integers we said integer a is equal to 233 and then 256</p>



<p class="wp-block-paragraph">those were the same numbers that we just multiplied so we should probably get the same result</p>



<p class="wp-block-paragraph">if we&#8217;re lucky so i&#8217;m saying i&#8217;m going to move both of these into registers so i&#8217;m going to move</p>



<p class="wp-block-paragraph">a into r14 and i&#8217;m going to move b into r15 just to prove to you that we can and then</p>



<p class="wp-block-paragraph">instruction we did before the result is going to go into r14 so let&#8217;s see i&#8217;m gonna print the</p>



<p class="wp-block-paragraph">prefix real fast here same kind of concept that we talked about before there&#8217;s just going to be</p>



<p class="wp-block-paragraph">a prefix before the result and then i&#8217;m actually going to print the result with this line right</p>



<p class="wp-block-paragraph">here or these lines i&#8217;m just going to print r14 which is holding the result at this point</p>



<p class="wp-block-paragraph">and hey we can trust that R14 wasn&#8217;t killed by the system call because the</p>



<p class="wp-block-paragraph">system call respects the ABI and then I&#8217;m gonna print my suffix right here and</p>



<p class="wp-block-paragraph">then a CRLF and that&#8217;s basically the idea let&#8217;s just double check here that</p>



<p class="wp-block-paragraph">we get the same result twice make run notice how it prints the same result</p>



<p class="wp-block-paragraph">twice once with globals once with immediates so if you were wondering</p>



<p class="wp-block-paragraph">before this video how to multiply immediates or how to multiply globals</p>



<p class="wp-block-paragraph">well there you go just put them into registers first and then call I&#8217;m all</p>



<p class="wp-block-paragraph">pretty fast let&#8217;s just do one other thing for fun I&#8217;m going to let&#8217;s see add</p>



<p class="wp-block-paragraph">one number to our 14 so to the result of the multiplication and then I&#8217;m going to</p>



<p class="wp-block-paragraph">add five to it just to prove to you that we can increase an integer by one and we</p>



<p class="wp-block-paragraph">we print it before we do the prefix extra stuff just for fun so here I&#8217;m gonna increase r14 and</p>



<p class="wp-block-paragraph">I&#8217;m gonna say that it is a q word I guess that&#8217;s implied already because r14 is considered a 64-bit</p>



<p class="wp-block-paragraph">register but if we wanted to increase I don&#8217;t know just for the sake of argument if we wanted</p>



<p class="wp-block-paragraph">to like increase this right here let me just show you real fast how we do it we would say increase</p>



<p class="wp-block-paragraph">would say increase q word and then name the integer in global memory so in global memory</p>



<p class="wp-block-paragraph">the system doesn&#8217;t really know by default if it&#8217;s a one byte integer a two byte integer or four or</p>



<p class="wp-block-paragraph">eight so you just have to specify the data size so it knows which integers to look at when it&#8217;s</p>



<p class="wp-block-paragraph">considering what the original value is and how to overflow and when to overflow but you know just</p>



<p class="wp-block-paragraph">for fun I&#8217;m putting that in here so it&#8217;s going to increase the result by one and then it&#8217;s going to</p>



<p class="wp-block-paragraph">and it&#8217;s going to do that using the addition instruction.</p>



<p class="wp-block-paragraph">So we&#8217;re going to add R14 with 5.</p>



<p class="wp-block-paragraph">We can put an immediate there,</p>



<p class="wp-block-paragraph">and the result is going to be stored in R14.</p>



<p class="wp-block-paragraph">So basically R14 is equal to R14 plus 5.</p>



<p class="wp-block-paragraph">And so overall, when we add those two things in there,</p>



<p class="wp-block-paragraph">the second result should now be about 6 higher than the first result.</p>



<p class="wp-block-paragraph">So if you kind of look at this right here,</p>



<p class="wp-block-paragraph">we have 648, and then we have 644,</p>



<p class="wp-block-paragraph">which is 6 numbers higher than the original result.</p>



<p class="wp-block-paragraph">than the original result. So these are the basics of integer arithmetic with</p>



<p class="wp-block-paragraph">signed multiplication and addition. I think that&#8217;s all I really wanted to show</p>



<p class="wp-block-paragraph">you. Yeah, okay. So I hope you learned a little bit of stuff from this video. I</p>



<p class="wp-block-paragraph">hope you had a little bit of fun. Come back, I&#8217;ll see you in the next video and</p>



<p class="wp-block-paragraph">happy coding! Hey everybody! Thanks for watching this video again from the</p>



<p class="wp-block-paragraph">appreciate it. I do hope you did learn something and have some fun. If you could do me a please,</p>



<p class="wp-block-paragraph">a small little favor, could you please subscribe and follow this channel or these videos or</p>



<p class="wp-block-paragraph">whatever it is you do on the current social media website that you&#8217;re looking at right now.</p>



<p class="wp-block-paragraph">It would really mean the world to me and it&#8217;ll help make more videos and grow this community.</p>



<p class="wp-block-paragraph">So we&#8217;ll be able to do more videos, longer videos, better videos, or just I&#8217;ll be able to keep making</p>



<p class="wp-block-paragraph">kindness and uh and subscribe you know sometimes i&#8217;m sleeping in the middle of the night and i just</p>



<p class="wp-block-paragraph">wake up because i know somebody subscribed or followed it just wakes me up and i get filled</p>



<p class="wp-block-paragraph">with joy that&#8217;s exactly what happens every single time so you could do it as a nice favor to me or</p>



<p class="wp-block-paragraph">you could you could troll me if you want to just wake me up in the middle of the night just subscribe</p>



<p class="wp-block-paragraph">and then i&#8217;ll i&#8217;ll just wake up i promise that&#8217;s what will happen also uh if you look at the middle</p>



<p class="wp-block-paragraph">of the screen right now you should see a qr code which you can scan in order to go to the website</p>



<p class="wp-block-paragraph">which I think is also named somewhere at the bottom of this video.</p>



<p class="wp-block-paragraph">And it&#8217;ll take you to my main website where you can just kind of like see</p>



<p class="wp-block-paragraph">all the videos I published and the services and tutorials and things that I offer</p>



<p class="wp-block-paragraph">and all that good stuff.</p>



<p class="wp-block-paragraph">And if you have a suggestion for clarifications or errata or just future videos that you want to see,</p>



<p class="wp-block-paragraph">please leave a comment.</p>



<p class="wp-block-paragraph">Or if you just want to say, hey, what&#8217;s up? What&#8217;s going on?</p>



<p class="wp-block-paragraph">You know, just send me a comment, whatever.</p>



<p class="wp-block-paragraph">I also wake up for those in the middle of the night.</p>



<p class="wp-block-paragraph">middle of the night I get I wake up in a cold sweat and I&#8217;m like it would really it really</p>



<p class="wp-block-paragraph">mean the world to me I would really appreciate it so again thank you so much for watching this video</p>



<p class="wp-block-paragraph">and um enjoy the cool music as as I fade into the darkness which is coming for us all</p>



<p class="wp-block-paragraph">Thank you.</p>
<p>The post <a href="https://www.NeuralLantern.com/x86-64-assembly-signed-integer-multiplication-and-addition-with-imul-add-yasm-on-ubuntu-linux/">x86-64 Assembly: Signed Integer Multiplication and Addition with IMUL &amp; ADD (YASM on Ubuntu Linux)</a> appeared first on <a href="https://www.NeuralLantern.com">NeuralLantern.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.NeuralLantern.com/x86-64-assembly-signed-integer-multiplication-and-addition-with-imul-add-yasm-on-ubuntu-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
