Geoff Chappell - Software Analyst
This function is called by the WIN386.EXE program from Windows/386 to obtain an array of structures which each describe a range of memory that must be instanced between virtual machines. Though it is an int 21h function, it does not seem to be a DOS interface in the sense of having been defined by Microsoft, even if kept undocumented. An implementation is known in NETX.COM from Novell Netware, but much too much later for any inference about the history.
Whatever motivated Microsoft to have WIN386.EXE call an int 21h function that may have been defined elsewhere, the fact is that int 21h function B500h is the first interface that Microsoft had Windows call for learning of other programs’ instance data. The call is made even by version 2.01 and thus predates Microsoft’s own int 2Fh function 1603h.
The function uses registers for both input and output.
|cx||number of entries in instance table|
|es:bx||address of instance table|
It is not known whether the interface provides for the return of zero in cx as explicit failure rather than trivial success. Either way, if callers are to distinguish the return of an address and count from the function’s simply leaving registers unchanged for being unimplemented, they will need to clear cx (if not also es and bx) to zero before calling.
The table is an array of six-byte entries:
|00h||word||segment address of instance data|
|02h||word||offset of instance data (within segment)|
|04h||word||size of instance data (in bytes)|
Note the similarity with the six-byte entries in the table that’s obtained by the later int 2Fh function 1603h.