From the course: Learning Assembly Language
Unlock the full course today
Join today to access over 25,200 courses taught by industry experts.
Arithmetic operators - Python Tutorial
From the course: Learning Assembly Language
Arithmetic operators
- [Instructor] The next set of data manipulation instructions that we'll look at, are the integer arithmetic operators, add, subtract, multiply and divide. I've coded the starter program as a demonstration, so let's build and debug it. build starter dot EXE, debug starter dot EXE. we'll run to user code, go down, and into the starter code. As we're going through this, keep your eyes on the registers in the top right. We'll load the value 42 into racks and then negate it. We can see the result in racks, leading F's ending with D six, the leading F's are the sign extension. We can increment a value which adds one to it. Load 42 into racks and increment it. And we can also decrement, which takes one away. Load 42 into racks and decrement it. We use increment and decrement because they're very fast operations, but we can also add and subtract larger numbers. Here we'll move 42 into racks and add 13. And we get…
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 12s
-
(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
-
-
-
-
-
-