Now that we have marked the “drawers” that we will store our data in, we get to move on to the code itself! But before we can write our own code, we need to understand how to order the code.
Like most high-level programming languages, code is executed in a linear order downward through the text until instructed to stop, jump or loop back to another part of the program. Fortunately for us, assembly language is also structured this way. So every command you enter will be executed in the order of the line it is written on. Let’s look at the ways we can break the linear order of execution.
Jump: This command is how you move to different lines of code based on a condition. The JMP command is similar to an if statement in other languages. Unlike an if command however, you cannot define your own condition with a JMP statement. There are several ways to utilize this command, but each requires its own unique version of the command. For example: