INT 21 - DOS 1+ - CREATE NEW PROGRAM SEGMENT PREFIX                             
	AH = 26h
	DX = segment at which to create PSPsee Program Segment Prefix (see #01378)
Return: AL destroyed
Notes:	new PSPsee Program Segment Prefix is updated with memory size information; INTs 22h, 23h, 24h
	  taken from interrupt vector table; the parent PSPsee Program Segment Prefix field is set to 0
	(DOS 2+) DOS assumes that the caller's CS is the segment of the PSPsee Program Segment Prefix to
	  copy
BUG:	DR DOS 6.0 original releases 05/1991 & 08/1991 had a problem where the
	  segment from which the PSPsee Program Segment Prefix was copied was incorrect so that the PSPsee Program Segment Prefix
	  was not filled correctly and did not contain the command tail.  The
	  DR DOS 6.0 BDOS patch "PAT312" English (1992/01/07, XDIR /C: A0C6h)
	  and later "full" rebuilds fix this problem (see INT 21/AX=4452h).
SeeAlso: AH=4Bh,AH=50h,AH=51h,AH=55h,AH=62h,AH=67h


Format of Program Segment PrefixThe Program Segment Prefix is a 256-byte data area prepended to a program when it is loaded.  It contains the command line that the program was invoked with, and a variety of housekeeping information for DOS.  See also INT 21h Function 26h. (PSPsee Program Segment Prefix):
Offset	Size	Description	(Table 01378)
 00h  2 BYTEs	INT 20 instruction for CP/M(Control Program for Microcomputers) An early operating system for micros based on the 8-bit Intel 8080 CPU (and later the compatible 8085 and Zilog Z80 CPUs).  MSDOS version 1.0 was essentially a clone of CP/M for the Intel 8086. CALL 0 program termination
		the CDh 20h here is often used as a signature for a valid PSPsee Program Segment Prefix
 02h	WORD	segment of first byte beyond memory allocated to program
 04h	BYTE	(DOS) unused filler
		(OS/2) count of fake DOS version returns
 05h	BYTE	CP/M(Control Program for Microcomputers) An early operating system for micros based on the 8-bit Intel 8080 CPU (and later the compatible 8085 and Zilog Z80 CPUs).  MSDOS version 1.0 was essentially a clone of CP/M for the Intel 8086. CALL 5 service request (FAR CALL to absolute 000C0h)
		BUG: (DOS 2+ DEBUG) PSPs created by DEBUG point at 000BEh
 06h	WORD	CP/M(Control Program for Microcomputers) An early operating system for micros based on the 8-bit Intel 8080 CPU (and later the compatible 8085 and Zilog Z80 CPUs).  MSDOS version 1.0 was essentially a clone of CP/M for the Intel 8086. compatibility--size of first segment for .COM files
 08h  2 BYTEs	remainder of FAR JMP at 05h
 0Ah	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	stored INT 22 termination address
 0Eh	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	stored INT 23 control-Break handler address
 12h	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	DOS 1.1+ stored INT 24 critical error handler address
 16h	WORD	segment of parent PSPsee Program Segment Prefix
 18h 20 BYTEs	DOS 2+ Job File TableThe Job File Table (also called Open File Table) stored in a program's PSP which translates handles into SFT numbers.  See also INT 21h Function 26h., one byte per file handle, FFh = closed
 2Ch	WORD	DOS 2+ segment of environment for process (see #01379)
 2Eh	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	DOS 2+ process's SS:SP on entry to last INT 21 call
 32h	WORD	DOS 3+ number of entries in JFTsee Job File Table (default 20)
 34h	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	DOS 3+ pointer to JFTsee Job File Table (default PSPsee Program Segment Prefix:0018h)
 38h	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	DOS 3+ pointer to previous PSPsee Program Segment Prefix (default FFFFFFFFh in 3.x)
		used by SHARE in DOS 3.3
 3Ch	BYTE	DOS 4+ (DBCS) interim console flag (see AX=6301h)
		Novell DOS 7 DBCS interim flag as set with AX=6301h
		(possibly also used by Far East MS-DOS 3.2-3.3)
 3Dh	BYTE	(APPEND) TrueName flag (see INT 2F/AX=B711h)
 3Eh	BYTE	(Novell NetWare) flag: next byte initialized if CEh
		(OS/2) capabilities flag
 3Fh	BYTE	(Novell NetWare) Novell task number if previous byte is CEh
 40h  2 BYTEs	DOS 5+ version to return on INT 21/AH=30h
 42h	WORD	(MSWindows3) selector of next PSPsee Program Segment Prefix (PDB) in linked list
		Windows keeps a linked list of Windows programs only
 44h	WORD	(MSWindows3) "PDB_Partition"
 46h	WORD	(MSWindows3) "PDB_NextPDB"
 48h	BYTE	(MSWindows3) bit 0 set if non-Windows application (WINOLDAP)
 49h	BYTE	unused by DOS versions <= 6.00
 4Ch	WORD	(MSWindows3) "PDB_EntryStack"
 4Eh  2 BYTEs	unused by DOS versions <= 6.00
 50h  3 BYTEs	DOS 2+ service request (INT 21/RETF instructions)
 53h  2 BYTEs	unused in DOS versions <= 6.00
 55h  7 BYTEs	unused in DOS versions <= 6.00; can be used to make first FCBsee File Control Block
		  into an extended FCBsee File Control Block
 5Ch 16 BYTEs	first default FCBsee File Control Block, filled in from first commandline argument
		overwrites second FCBsee File Control Block if opened
 6Ch 16 BYTEs	second default FCBsee File Control Block, filled in from second commandline argument
		  overwrites beginning of commandline if opened
 7Ch  4 BYTEs	unused
 80h 128 BYTEs	commandline / default DTAsee Disk Transfer Address
		command tail is BYTE for length of tail, N BYTEs for the tail,
		  followed by a BYTE containing 0Dh
Notes:	in DOS v3+, the limit on simultaneously open files may be increased by
	  allocating memory for a new open file table, filling it with FFh,
	  copying the first 20 bytes from the default table, and adjusting the
	  pointer and count at 34h and 32h.  However, DOS will only copy the
	  first 20 file handles into a child PSPsee Program Segment Prefix (including the one created on
	  EXEC).
	in an OS/2 DOS box, values of D0h-FEh in the open file table indicate
	  device drivers
	network redirectors based on the original MS-Net implementation use
	  values of 80h-FEh in the open file table to indicate remote files;
	  Novell NetWare also uses values from FEh down to 80h or one more than
	  FILES= (whichever is greater) to indicate remote files (except on
	  OS/2, where is uses CFh down to 80h)
	MS-DOS 5.00 incorrectly fills the FCBsee File Control Block fields when loading a program
	  high; the first FCBsee File Control Block is empty and the second contains the first
	  parameter
	some DOS extenders place protected-mode values in various PSPsee Program Segment Prefix fields
	  such as the "parent" field, which can confuse PSPsee Program Segment Prefix walkers.  Always
	  check either for the CDh 20h signature or that the suspected PSPsee Program Segment Prefix is
	  at the beginning of a memory block which owns itself (the preceding
	  paragraph should be a valid MCBsee Memory Control Block with "owner" the same as the
	  suspected PSPsee Program Segment Prefix).
	Novell NetWare updates the fields at offsets 3Eh and 3Fh without
	  checking that a legal PSPsee Program Segment Prefix segment is current; see AH=50h for further
	  discussion
	for 4DOS and Windows95, the command tail may be more than 126
	  characters; in that case, the length byte will be set to 7Fh (with
	  an 0Dh in the	 127th position at offset FFh), and the first 126
	  characters will be stored in the PSPsee Program Segment Prefix, with the entire command line
	  in the environment variable CMDLINE; under at least some versions
	  of 4DOS, the byte at offset FFh is *not* set to 0Dh, so there is no
	  terminating carriage return in the PSPsee Program Segment Prefix's command tail.
BUG:	When shelling out from the Borland Pascal 7.00 IDE(Integrated Drive Electronics) A type of disk drive interface which essentially extends the PCIBM PC's expansion bus all the way to the drive and places the drive controller on the disk drive itself.	 See also ESDI., overly-long
	  command lines will not be delimited by a 0Dh character, and the
	  length byte is set to 80h!  A workaround is to always patch in a
	  0Dh at the last position of the command line buffer before scanning
	  the command line.


Format of environment block:
Offset	Size	Description	(Table 01379)
 00h  N BYTEs	first environment variable, ASCIZA NUL-terminated ASCII string.	The ASCIZ string "ABC" consists of the four bytes 41h, 42h, 43h, and 00h.  Unless otherwise specified, maximum lengths given in the interrupt list do not include the terminating NUL. string of form "var=value"
      N BYTEs	second environment variable, ASCIZA NUL-terminated ASCII string.	The ASCIZ string "ABC" consists of the four bytes 41h, 42h, 43h, and 00h.  Unless otherwise specified, maximum lengths given in the interrupt list do not include the terminating NUL. string
	...
      N BYTEs	last environment variable, ASCIZA NUL-terminated ASCII string.	The ASCIZ string "ABC" consists of the four bytes 41h, 42h, 43h, and 00h.  Unless otherwise specified, maximum lengths given in the interrupt list do not include the terminating NUL. string of form "var=value"
	BYTE	00h
---DOS 3.0+ ---
	WORD	number of strings following environment (normally 1)
      N BYTEs	ASCIZA NUL-terminated ASCII string.	The ASCIZ string "ABC" consists of the four bytes 41h, 42h, 43h, and 00h.  Unless otherwise specified, maximum lengths given in the interrupt list do not include the terminating NUL. full pathname of program owning this environment
		other strings may follow