Skip to content

Commit 6b719a5

Browse files
Edit some steps
1 parent b26e3ec commit 6b719a5

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

content/post/binary-bomb-phase-6.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,21 +178,30 @@ If the value turns out to be less than 1, the explode_bomb is function being cal
178178

179179
![first loop condition 1](/images/func%201%20condition%201.png)
180180

181-
- If the value is more than 1, then again the `inp[a]` is being compared with 6. If the value is greater than 6, the jump statement is not executed and explode_bomb function will be called.
181+
- If the value of `inp[a]` is more than 1, then again the `inp[a]` is being compared with 6. If the value is greater than 6, the jump statement is not executed and explode_bomb function will be called.
182182
**So, the value of `inp[a]` should be in range of 1 and 6.**
183183

184184
![first loop condition 2](/images/func%201%20condition%202.png)
185185

186-
- If the value of `a` is in [1,6], then a new variable `rbp+0e4h` (let's call it variable `b`) is assigned the value `a+1`.
187-
- The jump statement takes to condition statement, where the value of `b` is compared with 6. If the value is greater than or equal to 6, the jump statment again takes control to the increment operation of variable `a`.
186+
- If the value of `inp[a]` is less than or equal to 6, then a new variable `rbp+0e4h` (let's call it variable `b`) is assigned the value `a+1`.
187+
188+
![b assignment](/images/b%20assignment.png)
189+
190+
- The jump statement takes the control to a condition statement, where the value of `b` is compared with 6.
191+
192+
![b condition](/images/b%20condition.png)
193+
194+
- If the value is greater than or equal to 6, the jump statment again takes control to the increment operation of variable `a`.
195+
196+
![nested loop end](/images/func%201%20nested%20loop%20end.png)
188197

189198
- If the value of `b` is less than 6, then there is a comparison between `inp[a]` and `inp[b]`.
190199

191200
![array values comparison](/images/func%201%20array%20values%20cmp.png)
192201

193202
- If the values are equal, the jump statement is not taken, and explode_bomb function is called. If the values are not equal, the jump statement takes the control to increment of variable `b` and back to the loop condition of comparison of value `b` with 6.
194203

195-
![array values not equal jump](/images/func%201%20array%20values%20not%20equal%20jump.png)
204+
![array values not equal jump](/images/func1%20array%20values%20not%20equal.png)
196205
![b value increment](/images/func%201%20array%20values%20not%20equal%20jump.png)
197206

198207
- Now, if we go back and look around the read_six_numbers function, there is an instruction related to node. Address of this node is saved to `rbp+8`.

0 commit comments

Comments
 (0)