-------------------------------------------------------------------------------- RSX4EMX.TXT DPMI-RSX (c) Rainer Schnitker 2/94 -------------------------------------------------------------------------------- (out of date ; should updated for rsx4) 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.8 under DOS, not OS/2 AX=7F00H sbrk() AX=7F01H brk() both: only positive values are allowed ( < EMX0.8h) 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: P_SESSION, P_DETACH cannot used. command line is restricted to 128 characters rsx: all programs get the environment from father process P_OVERLAY (RM programs) close the EMX program emx: real-mode programs get environment from EMX P_OVERLAY not allowed for RM programs. AX=7F08H ptrace() both: PTRACE_TRACEME, PTRACE_SESSION ignored rsx: FP-status not implemented yet AX=7F09H wait() both: wait() returns immediately (no multitasking) emx: wait() is currently implemented only for processes being debugged and for synchronous processes started with P_NOWAIT AX=7F0AH emxversion() rsx: DPMI flag, 387 flag, -ac flag are always true AX=7F0BH memavail() rsx: this value includes virtual memory AX=7F0CH signal() AX=7F0DH kill() emx: it does not switch processes rsx: kill switch programs (only to children) AX=7F0EH raise() emx: core dump file will be created unless the -c emx option is used rsx: no core file 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 emx internal 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 under DOS AX=7F1AH pipe() both: not implemented under DOS AX=7F1BH fsync() not implemented under DOS AX=7F1CH fork() emx: not implemented under DOS rsx: fork() switch to child, parent stopped (like P_WAIT) AX=7F1DH scrsize() AX=7F1EH select() rsx: not implemented AX=7F1FH syserrno() both: not implemented under DOS 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() AX=7F25H ftruncate() AX=7F26H clock() AX=7F27H ftime() AX=7F28H umask() AX=7F29H getppid() AX=7F2AH nls_memupr() rsx: not implemented 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: not implemented under DOS AX=7F2DH endthread() both: not implemented under DOS AX=7F2EH waitpid both: not implemented under DOS AX=7F2FH read_kbd() AX=7F30H sleep2() AX=7F31H unwind2() AX=7F32H pause() both: not implemented under DOS AX=7F33H execname() both: not implemented under DOS AX=7F34H initthread() both: not implemented under DOS --------------------------------------------------- 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