Author: Christophe Theron
Date: 20:57:34 11/16/01
Go up one level in this thread
On November 16, 2001 at 23:33:36, Eugene Nalimov wrote:
>There were no executable prefixes on the CP/M. OS loaded executable image to
>memory starting form address 0100H and just "jmp 0100H" after that.
That's exactly why MS-DOS introduced a PSP starting at address CS:0000 to
CS:00FF.
The PSP was used to simulate the environment CP/M programs were used to.
MS-DOS ".com" programs load at CS:0100. The PSP provides a way to call the
system by loading some function number in AH, and call a fixed address at
CS:0005 or CS:0050 (calling 050h was the same as issuing INT 21h).
To end your program you just add to do "JMP 0". At CS:0000 you had a jump to the
DOS instructions that ended the program (exactly the same as issuing INT 20h).
That's the way CP/M programs called the system and ended programs, and MS-DOS
was supposed to be compatible with that. The big difference naturally was that
the 80x86 processors added segment registers to the Z80 or 8085 architecture. So
CP/M had only one 64K segment of address space, where MS-DOS could have several
ones, indexed with the CS register.
So CP/M had only one 0000 to 0100 area, where MS-DOS provided one (called the
PSP) for each program loaded in memory.
(my source for the above is "The MS-DOS Encyclopedia" by Ray Duncan, Microsoft
Press)
This CP/M compatibility still exists in current versions of Windows, including
XP. Actually as long as Windows will provide DOS boxes, it will carry this CP/M
legacy.
Christophe
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.