From a0c763c2481f4b04a20c00d0e0c735c441dc7e21 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Wed, 12 Jul 2023 23:01:15 -0700 Subject: [PATCH] Handle sstderr --- cli/uxnvm/uxnvm.tal | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/cli/uxnvm/uxnvm.tal b/cli/uxnvm/uxnvm.tal index b212cc2..6a72bb4 100644 --- a/cli/uxnvm/uxnvm.tal +++ b/cli/uxnvm/uxnvm.tal @@ -57,13 +57,24 @@ JMP2r @send ( v* p* -- ) - NIP DUP #0e NEQ ?&>no-debug + NIP + ( | handlers ) + DUP #0e NEQ ?&>no-debug &>no-debug DUP #0f NEQ ?&>no-halt &>no-halt - DUP #18 NEQ ?&>no-console - OVR #18 DEO &>no-console - POP POP2 JMP2r + DUP #18 NEQ ?&>no-out + POP #18 DEO + POP JMP2r &>no-out + DUP #19 NEQ ?&>no-err + POP #19 DEO + POP JMP2r &>no-err + ( | error ) + /b + #2018 DEO + + #0a18 DEO + JMP2r @halt ( opcode -- ) #01 .emu/sleep STZ