From 9fe5956ccf526188287b4e9939b4b73ba22920ba Mon Sep 17 00:00:00 2001 From: Doni Pracner Date: Sun, 5 Jan 2014 21:27:27 +0100 Subject: [PATCH] mjc2wsl - added optional PRINTs of addresses as the WSL code is executed, plus optional pauses after each --- src/mjc2wsl.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mjc2wsl.java b/src/mjc2wsl.java index 917978c..76d225b 100644 --- a/src/mjc2wsl.java +++ b/src/mjc2wsl.java @@ -32,6 +32,9 @@ public class mjc2wsl{ out.println("total errors:"+messageCounters[M_ERR]+" warnings:"+messageCounters[M_WAR]); } + private boolean addPauseAfterEachAddress=false, + addPrintForEachAddress = false; + /** Constant used for marking a regular comment from the original file */ public static final char C_REG = ' '; /** @@ -286,6 +289,11 @@ public class mjc2wsl{ if (originalInComments) prl(createComment(describeOpCode(op), C_OC)); prl("a" + counter + " == "); + if (addPrintForEachAddress) { + prl("PRINT(\"a"+counter+"\");"); + if (addPauseAfterEachAddress) + prl("debug_disposable_string := @Read_Line(Standard_Input_Port);"); + } switch (op) { case load: { prl(cmdToEStack(loc(get()))); -- 2.25.1