--------------------------------------------------------------------------------
RSX4EMX.TXT		DPMI-RSX	(c) Rainer Schnitker		7/93
--------------------------------------------------------------------------------

There are some diffences between EMX(under DOS) and RSX(under DPMI).
Also some things are not implemented in one version.

"emx" below means EMX-0.8e/f under DOS, not OS/2

AX=7F00H sbrk()
AX=7F01H brk()
    both:
	only positive values are allowed
	libc-malloc returns NULL, if user has called brk,sbrk

AX=7F02H ulimit()
    both:
	command code must be 3 ( return greatest possible break_value )

AX=7F03H vmstat()
    rsx:
	cannot used (EMX internal)

AX=7F04H umask1()
    both:
	file permission mask is not used

AX=7F05H getpid()

AX=7F06H spawnve()
    both:
	Only P_WAIT, P_OVERLAY, P_DEBUG are valid arguments,
	P_NOWAIT, P_SESSION, P_DETACH cannot used for a.out programs.
	Real-mode DOS programs must use P_WAIT, and the command line is
	restricted to 128 characters
    rsx:
	all programs get the environment from father process
	SIGCLD is raised if the new program stops or terminates
    emx:
	real-mode programs get environment from EMX
	SIGCLD is raised only if a P_DEBUG program terminates

AX=7F08H ptrace()
    both:
	PTRACE_TRACEME, PTRACE_SESSION ignored
    emx:
	a process can debug only one child, and wait() cannot be used
	for another child
    rsx:
	FP-status not implemented yet

AX=7F09H wait()
    both:
	wait() returns immediately (no multitasking)
    emx:
	wait() is implemented only for processes started with P_DEBUG
	and running under control of ptrace
        interrupted programs (SIGINT) can't restarted

AX=7F0AH emx version
    rsx:
	DPMI0.9-flag is true

AX=7F0BH available memory

AX=7F0CH signal()
    emx:
	hardware exceptions terminate all programs
	only ptrace() can catch a fault
    rsx:
	hardware exception stops childs and switch to father process

AX=7F0DH kill()
    emx:
	it does not switch processes
	only SIGINT and SIGBREAK can be sent to any process.
	process can send SIGQUIT only to itself
    rsx:
	kill switch programs (only to children) and raised the signal

AX=7F0EH raise()

AX=7F0FH uflags()
    rsx:
	cannot used

AX=7F10H unwind()

AX=7F11H core()
    rsx:
	not implemented

AX=7F12H portaccess()
    emx:
	-ai option must be used to enable _portaccess
    rsx:
	DPMI-server must support a port access
	option -ai ignored, _portaccess enabled

AX=7F13H memaccess()
    both:
	the -am option must be used to enable _memaccess
    rsx:
	very dangerous, DPMI-server must catch access to A0000H-BFFFFH

AX=7F14H ioctl2()

AX=7F15H alarm()  Set alarm clock
    rsx:
	SIGALRM will only be raised after a int 0x21

AX=7F16H
    both:
	cannot used

AX=7F17H sleep()

AX=7F18H chsize()

AX=7F19H fcntl()
    both:
	O_NDELAY is only implemented for handle 0 (keyboard)
	O_GETFD and O_SETFD are not implemented

AX=7F1AH pipe()
    both:
	not implemented

AX=7F1BH fsync()
	not implemented

AX=7F1CH fork()
    emx:
	Not implemented
    rsx:
	fork() switch to child, parent stopped (like P_WAIT)

AX=7F1DH scrsize()

AX=7F1EH select()
    both:
	not implemented

AX=7F1FH syserrno()
    both:
	not implemented

AX=7F20H stat()
    both:
	only some fields are valid

AX=7F21H fstat()
    both:
	only some fields are valid

AX=7F23H filesys()
    rsx:
	only "FAT" returned

AX=7F24H utimes()
    rsx:
	not implemented

AX=7F25H  ftruncate()

AX=7F26H  clock()

AX=7F27H  ftime()

AX=7F28H umask()

AX=7F29H getppid()

AX=7F2AH nls_memupr()

AX=7F2BH open()
    emx:
	path name must not be longer than 65531 bytes
    rsx:
	path name must not be longer than 5192 bytes

AX=7F2CH newthread()
    both:
	cannot used

AX=7F2DH endthread()
    both:
	cannot used

AX=7F2EH waitpid

AX=7F2FH read_kbd()

AX=7F30H sleep2()

AX=7F30H __unwind2()


registers at start:
    emx:
	CS = 10H
	DS = ES = SS = FS = GS = 17H
	ESP = stack, EIP = entry point

    rsx:
	CS = DPMI-selector ( code segment )
	DS = ES = FS = DPMI-selector = CS + 8 ( data segment )
	SS = DPMI-selector = CS + 16 ( special expand-down stack segment)
	   CS,DS,ES,FS have the same linear base address.
	GS = selector to first megabyte (DOS memory)
	ESP = stack, EIP = entry point
	others = 0

