284 lines
17 KiB
HTML
284 lines
17 KiB
HTML
<HTML>
|
|
<HEAD>
|
|
<TITLE>Int 21/AH=26h
|
|
</TITLE>
|
|
<META NAME="Description" CONTENT="
|
|
Int 21/AH=26h - DOS 1+ - CREATE NEW PROGRAM SEGMENT PREFIX -
|
|
AH = 26h
|
|
DX = segment at which to create PSP (see #01378)
|
|
Return: AL destroyed
|
|
Notes: new PSP is updated with memory size information; INTs 22h, 23h, 24h
|
|
taken from interrupt vector table; the parent PSP field is set to 0
|
|
(DOS 2+) DOS assumes that the caller's CS is the segment of the PSP to
|
|
copy
|
|
BUG: DR DOS 6.0 original releases 05/1991 & 08/1991 had a problem where the
|
|
segment from which the PSP was copied was incorrect so that the PSP
|
|
was not filled correctly and did not contain the command tail. The
|
|
">
|
|
<META NAME="robots" CONTENT="none">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFD0A0">
|
|
<center>
|
|
<h2>Int 21/AH=26h
|
|
</h2>
|
|
</center><p>
|
|
<table border=1 cellpadding=3 cellspacing=1>
|
|
<td>
|
|
<a href="rb-2681.htm" tppabs="http://www.ctyme.com/intr/rb-2681.htm">
|
|
<img src="lup.gif" tppabs="http://graphics.ctyme.com/gif/lup.gif" border=0 alt=Prev></a>
|
|
<a href="rb-2683.htm" tppabs="http://www.ctyme.com/intr/rb-2683.htm">
|
|
<img src="ldown.gif" tppabs="http://graphics.ctyme.com/gif/ldown.gif" border=0 alt=Next></a>
|
|
<a href="javascript:if(confirm('http://www.ctyme.com/rbrown.htm \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.ctyme.com/rbrown.htm'" tppabs="http://www.ctyme.com/rbrown.htm">
|
|
<img src="lhome.gif" tppabs="http://graphics.ctyme.com/gif/lhome.gif" border=0 alt=Ralf Brown Page></a>
|
|
<td><a href="int.htm" tppabs="http://www.ctyme.com/intr/int.htm">Interrups</a></td>
|
|
<td><a href="cat.htm" tppabs="http://www.ctyme.com/intr/cat.htm">Categories</a></td>
|
|
<td><a href="alpha.htm" tppabs="http://www.ctyme.com/intr/alpha.htm">Contents</a></td>
|
|
</td></table><p>
|
|
<p><img src="rbline.gif" tppabs="http://graphics.ctyme.com/gif/rbline.gif" width="100%" alt="------"><p>
|
|
<h3><font color=#C00040>DOS 1+ - CREATE NEW PROGRAM SEGMENT PREFIX</font></h3>
|
|
<PRE>
|
|
AH = 26h
|
|
DX = segment at which to create PSP <a href="rb-2682.htm#Table1378" tppabs="http://www.ctyme.com/intr/rb-2682.htm#Table1378">(see #01378)</a><br>
|
|
<p><b>Return:</b><br>AL destroyed
|
|
</PRE>
|
|
<p><b>Notes:</b>
|
|
New PSP is updated with memory size information; INTs 22h, 23h, 24h
|
|
taken from interrupt vector table; the parent PSP field is set to 0.
|
|
(DOS 2+) DOS assumes that the caller's CS is the segment of the PSP to
|
|
copy
|
|
<p><b>BUG:</b>
|
|
DR DOS 6.0 original releases 05/1991 & 08/1991 had a problem where the
|
|
segment from which the PSP was copied was incorrect so that the PSP
|
|
was not filled correctly and did not contain the command tail. The
|
|
<PRE>
|
|
<p><b>DR DOS 6.0 BDOS patch "PAT312" English (1992/01/07, XDIR /C:</b><br>A0C6h)
|
|
and later "full" rebuilds fix this problem (see INT 21/AX=4452h).
|
|
</PRE>
|
|
<p><b>See Also:</b>
|
|
<a href="rb-2939.htm" tppabs="http://www.ctyme.com/intr/rb-2939.htm">AH=4Bh</a> - <a href="rb-2980.htm" tppabs="http://www.ctyme.com/intr/rb-2980.htm">AH=50h</a> - <a href="rb-2982.htm" tppabs="http://www.ctyme.com/intr/rb-2982.htm">AH=51h</a> - <a href="rb-2989.htm" tppabs="http://www.ctyme.com/intr/rb-2989.htm">AH=55h</a> - <a href
|
|
"javascript:if(confirm('http://www.ctyme.com/intr/<PRE \n\nThis file was not retrieved by Teleport Pro, because the server reports that this file cannot be found. \n\nDo you want to open it from the server?'))window.location='http://www.ctyme.com/intr/<PRE'" tppabs="http://www.ctyme.com/intr/<PRE">
|
|
<p>
|
|
Format of Program Segment Prefix (PSP):
|
|
<a name=table1378></a>
|
|
Offset Size Description (Table 01378)
|
|
00h 2 BYTEs INT 20 instruction for CP/M CALL 0 program termination
|
|
the CDh 20h here is often used as a signature for a valid PSP
|
|
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 CALL 5 service request (FAR CALL to absolute 000C0h)
|
|
</PRE>
|
|
<p><b>BUG:</b>
|
|
(DOS 2+ DEBUG) PSPs created by DEBUG point at 000BEh
|
|
06h WORD CP/M compatibility--size of first segment for .COM files
|
|
08h 2 BYTEs remainder of FAR JMP at 05h
|
|
0Ah DWORD stored INT 22 termination address
|
|
0Eh DWORD stored INT 23 control-Break handler address
|
|
12h DWORD DOS 1.1+ stored INT 24 critical error handler address
|
|
16h WORD segment of parent PSP
|
|
18h 20 BYTEs DOS 2+ Job File Table, one byte per file handle, FFh = closed
|
|
2Ch WORD DOS 2+ segment of environment for process <a href="rb-2682.htm#Table1379" tppabs="http://www.ctyme.com/intr/rb-2682.htm#Table1379">(see #01379)</a>
|
|
2Eh DWORD DOS 2+ process's SS:SP on entry to last INT 21 call
|
|
32h WORD DOS 3+ number of entries in JFT (default 20)
|
|
34h DWORD DOS 3+ pointer to JFT (default PSP:0018h)
|
|
38h DWORD DOS 3+ pointer to previous PSP (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)
|
|
<PRE>
|
|
<p><b>3Eh BYTE (Novell NetWare) flag:</b><br>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 PSP (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 FCB
|
|
into an extended FCB
|
|
5Ch 16 BYTEs first default FCB, filled in from first commandline argument
|
|
overwrites second FCB if opened
|
|
6Ch 16 BYTEs second default FCB, filled in from second commandline argument
|
|
overwrites beginning of commandline if opened
|
|
7Ch 4 BYTEs unused
|
|
80h 128 BYTEs commandline / default DTA
|
|
command tail is BYTE for length of tail, N BYTEs for the tail,
|
|
followed by a BYTE containing 0Dh
|
|
</PRE>
|
|
<p><b>Notes:</b>
|
|
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 PSP (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 FCB fields when loading a program
|
|
high; the first FCB is empty and the second contains the first
|
|
parameter.
|
|
Some DOS extenders place protected-mode values in various PSP fields
|
|
such as the "parent" field, which can confuse PSP walkers. Always
|
|
check either for the CDh 20h signature or that the suspected PSP is
|
|
at the beginning of a memory block which owns itself (the preceding
|
|
paragraph should be a valid MCB with "owner" the same as the
|
|
suspected PSP)..
|
|
Novell NetWare updates the fields at offsets 3Eh and 3Fh without
|
|
checking that a legal PSP 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 PSP, 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 PSP's command tail.
|
|
<p><b>BUG:</b>
|
|
When shelling out from the Borland Pascal 7.00 IDE, 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.
|
|
<PRE>
|
|
<p>
|
|
Format of environment block:
|
|
<a name=table1379></a>
|
|
Offset Size Description (Table 01379)
|
|
00h N BYTEs first environment variable, ASCIZ string of form "var=value"
|
|
N BYTEs second environment variable, ASCIZ string.
|
|
...
|
|
N BYTEs last environment variable, ASCIZ string of form "var=value".
|
|
BYTE 00h
|
|
---DOS 3.0+ ---.
|
|
WORD number of strings following environment (normally 1)
|
|
N BYTEs ASCIZ full pathname of program owning this environment
|
|
other strings may follow
|
|
</PRE>
|
|
<p>
|
|
<b>Category: <a href="cat-010.htm" tppabs="http://www.ctyme.com/intr/cat-010.htm">
|
|
DOS Kernel</a>
|
|
- <a href="int-21.htm" tppabs="http://www.ctyme.com/intr/int-21.htm">
|
|
Int 21h</a>
|
|
- <a href="alpha-d.htm" tppabs="http://www.ctyme.com/intr/alpha-d.htm">
|
|
D</a>
|
|
</b><p><p><img src="rbline.gif" tppabs="http://graphics.ctyme.com/gif/rbline.gif" width="100%" alt="------"><p>
|
|
<table border=1 cellpadding=3 cellspacing=1>
|
|
<td>
|
|
<a href="rb-2681.htm" tppabs="http://www.ctyme.com/intr/rb-2681.htm">
|
|
<img src="lup.gif" tppabs="http://graphics.ctyme.com/gif/lup.gif" border=0 alt=Prev></a>
|
|
<a href="rb-2683.htm" tppabs="http://www.ctyme.com/intr/rb-2683.htm">
|
|
<img src="ldown.gif" tppabs="http://graphics.ctyme.com/gif/ldown.gif" border=0 alt=Next></a>
|
|
<a href="javascript:if(confirm('http://www.ctyme.com/rbrown.htm \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.ctyme.com/rbrown.htm'" tppabs="http://www.ctyme.com/rbrown.htm">
|
|
<img src="lhome.gif" tppabs="http://graphics.ctyme.com/gif/lhome.gif" border=0 alt=Ralf Brown Page></a>
|
|
<td><a href="int.htm" tppabs="http://www.ctyme.com/intr/int.htm">Interrups</a></td>
|
|
<td><a href="cat.htm" tppabs="http://www.ctyme.com/intr/cat.htm">Categories</a></td>
|
|
<td><a href="alpha.htm" tppabs="http://www.ctyme.com/intr/alpha.htm">Contents</a></td>
|
|
</td></table><p>
|
|
|
|
<!-- Bottom Link Start -->
|
|
|
|
<center>
|
|
|
|
<p><table border=1 bgcolor="#ffff99"><tr><td>
|
|
<table border=0 height=80>
|
|
<tr align=center><td width="65">
|
|
|
|
<a href="javascript:if(confirm('http://www.ctyme.com/sponsor.htm \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.ctyme.com/sponsor.htm'" tppabs="http://www.ctyme.com/sponsor.htm">
|
|
<img src="tip.gif" tppabs="http://graphics.ctyme.com/gif/tip.gif" ALT="Sponsors" height="40" width="40"></a>
|
|
<br><a href="javascript:if(confirm('http://www.ctyme.com/sponsor.htm \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.ctyme.com/sponsor.htm'" tppabs="http://www.ctyme.com/sponsor.htm">Shopping</a>
|
|
|
|
</td><td width="65">
|
|
|
|
<a href="javascript:if(confirm('http://talk.ctyme.com/webx.cgi?13@@.ee6b2be \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://talk.ctyme.com/webx.cgi?13@@.ee6b2be'" tppabs="http://talk.ctyme.com/webx.cgi?13@@.ee6b2be">
|
|
<img src="comment.gif" tppabs="http://graphics.ctyme.com/gif/comment.gif" ALT="Forum" height="40" width="40"></a>
|
|
<br><a href="javascript:if(confirm('http://talk.ctyme.com/webx.cgi?13@@.ee6b2be \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://talk.ctyme.com/webx.cgi?13@@.ee6b2be'" tppabs="http://talk.ctyme.com/webx.cgi?13@@.ee6b2be">Forum</a>
|
|
|
|
</td><td width="65">
|
|
|
|
<a href="javascript:if(confirm('http://www.ctyme.com/mail.htm \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.ctyme.com/mail.htm'" tppabs="http://www.ctyme.com/mail.htm">
|
|
<img src="mail.gif" tppabs="http://graphics.ctyme.com/gif/mail.gif" ALT="email" height="40" width="40"></a>
|
|
<br><a href="javascript:if(confirm('http://www.ctyme.com/mail.htm \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.ctyme.com/mail.htm'" tppabs="http://www.ctyme.com/mail.htm">EMail</a>
|
|
|
|
</td><td width="65">
|
|
|
|
<a href="javascript:if(confirm('http://www.ctyme.com/map.htm \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.ctyme.com/map.htm'" tppabs="http://www.ctyme.com/map.htm">
|
|
<img src="toc.gif" tppabs="http://graphics.ctyme.com/gif/toc.gif" ALT="Index" height="40" width="40"></a>
|
|
<br><a href="javascript:if(confirm('http://www.ctyme.com/map.htm \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.ctyme.com/map.htm'" tppabs="http://www.ctyme.com/map.htm">Index</a>
|
|
|
|
</td><td width="65">
|
|
|
|
<a href="javascript:if(confirm('http://www.ctyme.com/ \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.ctyme.com/'" tppabs="http://www.ctyme.com/">
|
|
<img src="home.gif" tppabs="http://graphics.ctyme.com/gif/home.gif" ALT="Home" height="40" width="40"></a>
|
|
<br><a href="javascript:if(confirm('http://www.ctyme.com/ \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.ctyme.com/'" tppabs="http://www.ctyme.com/">Home</a>
|
|
|
|
</td><td width="90">
|
|
|
|
<center>
|
|
<FORM ACTION="https://secure.paypal.com/cgi-bin/webscr" tppabs="https://secure.paypal.com/cgi-bin/webscr" METHOD="POST" traget="_blank">
|
|
<INPUT TYPE="hidden" NAME="cmd" VALUE="_xclick">
|
|
<INPUT TYPE="hidden" NAME="business" VALUE="marc@perkel.com">
|
|
<INPUT TYPE="hidden" NAME="return" VALUE="http://www.perkel.com">
|
|
<INPUT TYPE="hidden" NAME="item_name" VALUE="Donation To Support this Site">
|
|
<INPUT TYPE="hidden" NAME="no_intl" VALUE="1">
|
|
<INPUT TYPE="image" SRC="x-click-but7.gif" tppabs="http://images.paypal.com/images/x-click-but7.gif" vspace=9
|
|
NAME="submit" ALT="Make payments with PayPal - it's fast, free and secure!">
|
|
</FORM>
|
|
|
|
</td></tr></table></td></tr></table><p>
|
|
|
|
|
|
<center>
|
|
<p>
|
|
<a href="javascript:if(confirm('http://www.ctyme.com/hosting/index.htm \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.ctyme.com/hosting/index.htm'" tppabs="http://www.ctyme.com/hosting/index.htm" target="_blank">
|
|
<img src="ctymehost.gif" tppabs="http://graphics.ctyme.com/gif/ctymehost.gif"
|
|
border=3 height=60 width=468></a>
|
|
<p>
|
|
<!-- Ad End --->
|
|
|
|
</center>
|
|
<FORM ACTION="http://service.bfast.com/bfast/click" target="_blank">
|
|
<INPUT TYPE="hidden" NAME="siteid" VALUE="30472466" >
|
|
<INPUT TYPE="hidden" NAME="bfpage" VALUE="horizontal">
|
|
<INPUT TYPE="hidden" NAME="bfmid" VALUE="27253343" >
|
|
<INPUT TYPE="hidden" NAME="num" VALUE="30">
|
|
|
|
<table bgcolor=white border=3><tr><td>
|
|
<table bgcolor=white border=0>
|
|
<tr><td>
|
|
<IMG SRC="serve-bfmid=27253343&siteid=30472466&bfpage=horizontal.gif" tppabs="http://service.bfast.com/bfast/serve?bfmid=27253343&siteid=30472466&bfpage=horizontal" BORDER="0" WIDTH="1" HEIGHT="1" align=right NOSAVE >
|
|
<center><b>Search the web with Google</b></center>
|
|
</td></tr><tr><td>
|
|
<TABLE cellpadding=0 cellspacing=5 bgcolor="#FFFFFF">
|
|
<tr><td bgcolor="#0000cc"><IMG SRC="cleardot.gif" tppabs="http://www.google.com/images/cleardot.gif" height=1 border="0" ALT="Google"></td></tr><tr><td>
|
|
<IMG SRC="affiliate_logo.gif" tppabs="http://www.google.com/affiliates/affiliate_logo.gif" border="0" ALT="Google" align="center">
|
|
<INPUT TYPE=text name=q size=30 maxlength=255 value="">
|
|
<INPUT type=submit name=sa VALUE="Go">
|
|
</td></tr>
|
|
<tr><td bgcolor="#0000cc"><IMG SRC="cleardot.gif" tppabs="http://www.google.com/images/cleardot.gif" height=1 border="0" ALT="Google"></td></tr></TABLE>
|
|
</td></tr></table>
|
|
</tr></td></table>
|
|
</FORM>
|
|
|
|
</center>
|
|
|
|
|
|
<p><img src="rbline.gif" tppabs="http://graphics.ctyme.com/gif/rbline.gif" width="100%" alt="------"><p>
|
|
|
|
<!-- Bottom Link End -->
|
|
|
|
</BODY>
|
|
</HTML>
|