From: Doni Pracner Date: Sun, 5 Jan 2014 20:27:27 +0000 (+0100) Subject: mjc2wsl - added optional PRINTs of addresses as the WSL code is executed, plus option... X-Git-Tag: v0.1.4~42 X-Git-Url: https://svarog.pmf.uns.ac.rs/gitweb/?a=commitdiff_plain;h=9fe5956ccf526188287b4e9939b4b73ba22920ba;p=mjc2wsl.git mjc2wsl - added optional PRINTs of addresses as the WSL code is executed, plus optional pauses after each --- 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())));