Where is that published? I was using Github for references on DOS 4 as 3.3 isn't there yet.
(Thanks in advance!)
https://github.com/AR1972/DOS3.3/blob/master/SRC/CMD/SYS/SYS...
Send me a note via email -- I might have some more pointers for you
My guess is that DS isn't being maintained across the failing call to the IOCTL and ends up pointing to the wrong segment.