Bugfix for BRZ and BMI commands that weren't advancing the PC past
[vvhitespace] / tests / 4100_flowcontrol_branches_not_taken.pvvs
diff --git a/tests/4100_flowcontrol_branches_not_taken.pvvs b/tests/4100_flowcontrol_branches_not_taken.pvvs
new file mode 100644 (file)
index 0000000..fc9c2d0
--- /dev/null
@@ -0,0 +1,15 @@
+# This test verifies correct program flow when not
+# following a conditional branch.
+
+SSSTSSSSSTN     | ST: Push +65 (ASCII A)
+SSSTN           | ST: Push +1
+NTSTSTSTSN      | FC: BRZ -> '42'
+SSSTN           | ST: Push +1
+NTTTSTSTSN      | FC: BMI -> '42'
+TNSS            | IO: Output character
+NNN             | FC: Terminate program
+
+NSSVTSTSTSN     | FC: Mark label '42'
+SSSTSSSSTSN     | ST: Push +66 (ASCII B)
+TNSS            | IO: Output character
+NNN             | FC: Terminate program