Skip to content

Commit

Permalink
asm: last fixes for chapter-2
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Kuleshov <[email protected]>
  • Loading branch information
0xAX committed Jan 6, 2025
1 parent 8748809 commit edb15ed
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions content/asm_2.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ Here is the list of common assembly instructions used for arithmetic operations:
- `IDIV` - Signed division
- `INC` - Increment
- `DEC` - Decrement
- `NEG` - Negation.
- `NEG` - Negation

We will use these instructions and explain the details in the following example.

Expand All @@ -380,8 +380,7 @@ cmp rax, 50
The `cmp` instruction only compares the parameters without affecting their values. To perform any actions after the comparison, you can use **conditional jump instructions**:

- `JE/JZ` - Jump if the values are equal.
- `JNE` - Jump if the values are not equal.
- `JNZ` - Jump if the difference between two values is not zero.
- `JNE/JNZ` - Jump if the values are not equal.
- `JG` - Jump if the first value is greater than the second.
- `JGE` - Jump if the first value is greater or equal to the second.
- `JA` - The same as `JG`, but performs the unsigned comparison.
Expand Down

0 comments on commit edb15ed

Please sign in to comment.