From the course: Learning Assembly Language
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Controlling the assembler flow - Python Tutorial
From the course: Learning Assembly Language
Controlling the assembler flow
- [Instructor] At some stage, we'll want to check a value and change our execution path, depending upon the result. In a high level language, we can use if statements and for and while loops. While there are some macro instructions that provide higher level constructs in Assembler, we'll take the more basic approach and use direct Assembler instructions. When we execute an instruction, the processing chip maintains a set of flags, which may or may not be set. We can check these flags and change our execution path accordingly, using a jump instruction. And we can see here a selection of jump instructions. Note that when comparing a value, if it's equal, than the zero flag is set. Hence, jump zero and jump equal are in fact the same instruction. In general, jumps must be within plus or minus 128 bytes, except for the unconditional jump, which is unrestricted. Let's see how we use conditional jumps in code. I've…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Setting up a program skeleton4m 27s
-
(Locked)
Understanding registers and memory8m 5s
-
(Locked)
Data types3m 18s
-
(Locked)
Using data structures6m 13s
-
(Locked)
The move and exchange instructions7m 22s
-
(Locked)
Extended move instructions3m 44s
-
(Locked)
Logical or bitwise operators5m 40s
-
(Locked)
Arithmetic operators5m 12s
-
(Locked)
Controlling the assembler flow5m 22s
-
(Locked)
Indirect addressing and pointers4m 50s
-
(Locked)
Console Input and output4m 47s
-
(Locked)
Challenge1m 24s
-
(Locked)
Solution4m 20s
-
-
-
-
-
-