Skip to content

Commit f2e7f6a

Browse files
🧠 ❌ Topic conditional jumps --- Change pseudocode to literal block 🔬 (#230)
1 parent cdec086 commit f2e7f6a

File tree

1 file changed

+19
-16
lines changed

1 file changed

+19
-16
lines changed

site/topics/conditions/conditional-jump.rst

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -357,22 +357,25 @@ Programming with Conditional Jumps
357357
* Unfortunately, the machine code in hex format is hard to interpret
358358
* To make this more human readable, the program can be explained as follows
359359

360-
0. Load the value from address 15 to register A
361-
1. Load the value 10 to register B
362-
2. Calculate the difference
363-
3. Jump to address 6 if the significant bit/sign flag is high
364-
4. Output the contents of register 13
365-
5. Halt
366-
6. Output the contents of register 14
367-
7. Halt
368-
8. ``NOOP``
369-
9. ``NOOP``
370-
10. ``NOOP``
371-
11. ``NOOP``
372-
12. ``NOOP``
373-
13. 0
374-
14. 1
375-
15. Number to check
360+
.. code-block:: text
361+
:linenos:
362+
363+
Load the value from address 15 to register A
364+
Load the value 10 to register B
365+
Calculate the difference
366+
Jump to address 6 if the significant bit/sign flag is high
367+
Output the contents of register 13
368+
Halt
369+
Output the contents of register 14
370+
Halt
371+
NOOP
372+
NOOP
373+
NOOP
374+
NOOP
375+
NOOP
376+
0
377+
1
378+
Number to check
376379
377380
378381

0 commit comments

Comments
 (0)