26.1.2.1 Instruction open

Synopsys:

open

Open a new IO space. The handler string and a set of flags are passed on the stack. The descriptor of the opened IOS is pushed to the stack as a signed integer.

If there is no other IO space opened when this instruction is executed, then the just opened space becomes the current IO space.

If there is an error condition opening the IO space, a negative number indicating the condition is pushed on the stack. Note that valid IOS descriptors are non-negative. The possible error conditions are:

-1 for an unspecified error condition. -3 invalid flags specified -4 memory allocation failure. -5 end of file -6 invalid argument passed to open -7 IO space already opened -8 Insufficient permissions to perform the requested operation.

Stack: ( STR ULONG -- INT )