From 03e4d62915326d5049c4c12a1ad12dea2766e22b Mon Sep 17 00:00:00 2001 From: James Hughes Date: Thu, 13 Mar 2025 12:04:31 -0300 Subject: [PATCH 1/2] actually add it --- site/topics/conditions/conditional-jump.rst | 35 +++++++++++---------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/site/topics/conditions/conditional-jump.rst b/site/topics/conditions/conditional-jump.rst index 2762b720..697462f2 100644 --- a/site/topics/conditions/conditional-jump.rst +++ b/site/topics/conditions/conditional-jump.rst @@ -357,22 +357,25 @@ Programming with Conditional Jumps * Unfortunately, the machine code in hex format is hard to interpret * To make this more human readable, the program can be explained as follows - 0. Load the value from address 15 to register A - 1. Load the value 10 to register B - 2. Calculate the difference - 3. Jump to address 6 if the significant bit/sign flag is high - 4. Output the contents of register 13 - 5. Halt - 6. Output the contents of register 14 - 7. Halt - 8. ``NOOP`` - 9. ``NOOP`` - 10. ``NOOP`` - 11. ``NOOP`` - 12. ``NOOP`` - 13. 0 - 14. 1 - 15. Number to check + .. code-block:: text + :linenos: + + Load the value from address 15 to register A + Load the value 10 to register B + Calculate the difference + Jump to address 6 if the significant bit/sign flag is high + Output the contents of register 13 + Halt + Output the contents of register 14 + Halt + NOOP + NOOP + NOOP + NOOP + NOOP + 0 + 1 + Number to check From 0c73332533ca870c43a99d6dd74f523733110fbe Mon Sep 17 00:00:00 2001 From: James Hughes Date: Thu, 13 Mar 2025 12:07:50 -0300 Subject: [PATCH 2/2] remove indent --- site/topics/conditions/conditional-jump.rst | 38 ++++++++++----------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/site/topics/conditions/conditional-jump.rst b/site/topics/conditions/conditional-jump.rst index 697462f2..287de8d9 100644 --- a/site/topics/conditions/conditional-jump.rst +++ b/site/topics/conditions/conditional-jump.rst @@ -357,25 +357,25 @@ Programming with Conditional Jumps * Unfortunately, the machine code in hex format is hard to interpret * To make this more human readable, the program can be explained as follows - .. code-block:: text - :linenos: - - Load the value from address 15 to register A - Load the value 10 to register B - Calculate the difference - Jump to address 6 if the significant bit/sign flag is high - Output the contents of register 13 - Halt - Output the contents of register 14 - Halt - NOOP - NOOP - NOOP - NOOP - NOOP - 0 - 1 - Number to check +.. code-block:: text + :linenos: + + Load the value from address 15 to register A + Load the value 10 to register B + Calculate the difference + Jump to address 6 if the significant bit/sign flag is high + Output the contents of register 13 + Halt + Output the contents of register 14 + Halt + NOOP + NOOP + NOOP + NOOP + NOOP + 0 + 1 + Number to check