//MACRO WHILE Condition= !"", RepeatCode[]= [], WReg= !"", Far{boolean}= no //-------------------------------------------------------------------------------------------------- // // @ CopyRight Roberti & Parau Enterprises, Inc. 2021-2023 // // This work is licensed under the Creative Commons Attribution-NoDerivatives 4.0 International License. // To view a copy of this license, visit http://creativecommons.org/licenses/by-nd/4.0/ // or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. // //-------------------------------------------------------------------------------------------------- // if (Label === "") Label= DVASM.getNewLabel(); var nestStack= DVASM.getJSGlobal("__arch_condNestBlockStack"); if (nestStack == null) nestStack= []; // // Generate code for condition if any // var whileEnter= DVASM.getNewLabel(); var whileExit= DVASM.getNewLabel(); DVASM.formatLine(Label, "BYTE", "0[0]", ""); if (Condition !== "") { DVASM.formatLine("", "__CondGen", Condition + ", true, " + whileEnter + ", " + whileExit + ", WReg= " + WReg + ", " + Far, ""); nestStack.push(["WHILE", Label, whileEnter, whileExit, Label, RepeatCode, Condition]); } else { DVASM.formatLine(whileEnter, "BYTE", "0[0]", ""); nestStack.push(["WHILE", Label, whileEnter, whileExit, Label, RepeatCode]); } DVASM.formatLine("", "INDENTIN", "", ""); DVASM.putJSGlobal("__arch_condNestBlockStack", nestStack);