I tried your program on Steem with TOS 1.62 and it crashes on the trap #2 inside v_opnwk().
It crashes on v_clswk here (I believe).
In my documentation, it is said that calling v_opnwk() crashes because it is already opened by the AES, and it crashed for me. But the book also says that it can work if you close the physical workstation first.I added the following to your program: v_clswk( 1 ); /* Should be obtaianed via graf_handle() */ before v_opnwk(); Then it does not crashes, even if I loose the palette and the mouse.
Still crashes. Also I need to say prgflags -super a.out for the v_clswk().
However this is really black magic, I believe this should never be done in the real world.
This is pretty much what XaAES does (v_opnvwk/v_clsvwk inside of course).And why should it not be allowed to open a workstation? Even if there is one open already?
-Helmut