OS program factories (and all about GNOFIBM)
If the factory was produced by the Command System OSFACT command, Component 2 will be the .program, and Component 15 will be a data key with the starting address.
oc is currently unavailable to the OS program, but is included for consistency.
NOTE that the returned SOK may be DK(0) since the OS environment closes SYSPRINT and SYSOUT when the program terminates.
OSFACT(kt+5;SB,M,SB ==> kt+5;,,,,OSFACTCO)
c = 1 The first space bank is not prompt and official
c = 2 The first spacebank doesn't have sufficient space
c = 3 calling sequence error
c = 4 OSSIMF factory failure
c = 5 SNODE factory failure
OSENTRY(oc,osparms;SIK,SOK,PARM ==> c;,PARM,SIK,SOK)
As in the previous case oc is not available to the OS program.
NOTE that the returned SOK may be DK(0) as the os environment closes SYSOUT and SYSPRINT when the program terminates.
OSENTRY(kt ==> akt) or if akt was specified as 0, x'FF14'.
This calling sequence is much like the traditional creator sequence. The OSFD key is in cache slot 10. The second spacebank key is in slot 11.
OSENT(oc,params;key1,key2,key3 ==> c;key1,key2,key3)
The order code is not available to the program.
Keys 1-3 go into cache slots 3,4,5. Slots 7,8,9 contain the factory keys that were in slots 3,4,5.
The order code is passed to the OS program as a 4 byte parameter that is the binary order code.
Cache slot 10 has the OSFD key and slot 11 has the second spacebank key. The factory keys that were in slots 3,4,5 are in slots 7,8,9 but since 3,4,5 are not involved as parameters, they are the same as in the factory.
If the program ABENDs then the returned string is up to 4096 bytes of data that was the SYSPRINT file. High Ordinal programs have SYSPRINT defined to a page.
Summary
Slot 1 OSCOM key
Slot 2 EXIT to requestor key's caller
Slot 3 Parameter zero (often SIK)
Slot 4 Parameter one (often SOK)
Slot 5 Parameter two (often a node or CCK)
Slot 6 The domain creator
Slot 7 The synthetic domain key
Slot 8 The First Spacebank on the requestor call
Slot 9 The meter key
Slot 10 If the ordinal < 32768 Then the ARG key {(smord)} Else the OSFD {(osfd)} key
Slot 11 The key argument two of the requestor call
1 - Domain creator creator
2 - sometimes the .program {if created with the OSFACT command}
3 - A copy key
4 - OSSIMF the OS simulator factory
5 - Super Node factory
6 - read only key to PLILIB {PL/I libraries}
7 - Returner
8 - Data Key creator
9 - Data key with 2 bytes of time zone and 4 bytes of the start of Storage allocation (the highest address+1 of the .program)
15 - sometimes a data key with the start address {lower 4 bytes} if created by the OSFACT command
These programs are intended to interface with the command system. The OSFACT command produces factories of this type. The OSFLOAD command calls these factories and puts the entry key into the directory. The EXECUTE or FORK commands will call these entry keys with terminal keys as keys 3,4,5 and run them.
Note here that since keys 3,4,5 are not involved in the calling sequence, they are left as in the standard factory {(fac-slots)}. Keys 7,8,9 are duplicates. In fact keys 3,4,5 can be overlaid by the program without any ill effect.
High Ordinal OS objects can use the OS file SYSPRINT (as in PUT EDIT in PL/I) and PL/I run time messages will be written to this file. The contents of the file are returned as a string when the program terminates (returns to GNOFIBM). If the SYSPRINT file exceeds 4096 bytes, the domain will crash to a DDT. However if PL/I detects a run time error such as string size, the PL/I error will be returned along with the return code (2000 decimal usually) to help diagnose the problem.
OSSIMF initializes itself, installs itself as the domain keeper {databyte 0}, builds a new meter and installs itself as the meter keeper {databyte 3}, installs itself as the domain key {databyte 1}, windows the user memory, and returns the communication key {databyte 2} and OSFD {databyte 4} which is used to establish local filedef's.
OSSIMF(kt+5;SB,M,DOMKEY ==> kt+5;,,,OSSIMFCO)
See (p2,oscom) about OSCOM and (p2,osfd) about OSFD. This OSCOM does not obey order code kt+4.
The Domain Keeper key understands one explicit order code other than kt.
DK(kt; ==> x'214')