msgs: One msgWriteln with optional flags
Instead of msgWriteln, outWriteln and stdoutWriteln doing essentially the same.
This commit is contained in:
parent
a90e23a4dd
commit
acb6a36656
3 changed files with 19 additions and 24 deletions
|
|
@ -811,13 +811,13 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
|
|||
of opcEcho:
|
||||
let rb = instr.regB
|
||||
if rb == 1:
|
||||
stdoutWriteln(regs[ra].node.strVal)
|
||||
msgWriteln(regs[ra].node.strVal, {msgStdout})
|
||||
else:
|
||||
var outp = ""
|
||||
for i in ra..ra+rb-1:
|
||||
#if regs[i].kind != rkNode: debug regs[i]
|
||||
outp.add(regs[i].node.strVal)
|
||||
stdoutWriteln(outp)
|
||||
msgWriteln(outp, {msgStdout})
|
||||
of opcContainsSet:
|
||||
decodeBC(rkInt)
|
||||
regs[ra].intVal = ord(inSet(regs[rb].node, regs[rc].regToNode))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue