[net.micro.pc] DOS 2.0 info needed

berry@zehntel.UUCP (10/04/83)

#N:zinfandel:16600003:000:565
zinfandel!toy    Sep 30 19:54:00 1983


I am thinking about writing my own shell for the PC and there
are some questions I have about the environmen COMMAND.COM
lives in.  Anybody out there know ...

	How does COMMAND.COM tell DOS where the handler for the
	EXEC function is?

	How is it possible that the word at offset 6 in the program
segment prefix is both part of a long jump call and the size of a the segment.

There were more but I've lost my notepad.  If somebody answers these
then maybe I'll dig up the rest.  Thanks in advance if you
know the answers and share them with me.

				Michael Toy

markz@microsoft.UUCP (Mark Zbiokowski) (10/10/83)

	How does COMMAND.COM tell DOS where the handler for the
	EXEC function is?

On non-IBM systems, the EXEC system call is part of the kernel.  On IBM
systems COMMAND.COM installs a handler for INT 21h and filters those
calls with AH == 4Bh.

	How is it possible that the word at offset 6 in the program
	segment prefix is both part of a long call and the size
	of a the segment?

Clever manipulation: any CS:IP that refers to a particular location
has 12 bits of redundant information on the 8088/6.  Shuffling this
information around gives the desired result.