Bugs in Binaries
----------------

One of the V5 C compiler passes requires -DZERO_MEMORY: it must not
initialise a variable properly. V5 and V6 ar(1) do not close a file
descriptor after writing has finished. If Apout is compiled with
stream buffering, when this file is copied it is truncated. Either
turn off Apout stream buffering (a performance penalty), or patch
ar.s to behavie itself. The patch is:

*** ar.s.orig   Thu Jan 14 09:40:46 1999
--- ar.s        Thu Jan 14 09:41:12 1999
***************
*** 444,449 ****
--- 444,451 ----
        bes     crterr
        mov     r0,afo
        sys     write; magic; 2
+       mov     tfo,r0          / need to close before reading
+       sys     close
  1:
        mov     tfi,r0
        sys     read; buf; 512.


Floating-point Limitations
--------------------------

PDP-11 doubles are treated as floats. FEA/FEC don't exist.
FP errors are not dealt with. Mistrust FP results for now.

Limitations for 7th Edition Emulation in Apout 2.2
--------------------------------------------------

Note that V5 and V6 binaries are considered V7 binaries. Overlay
binaries (type 0405) are not recognised.

The errno values on the native system are not translated back to
the V7 errno values. There is normally a 1-to-1 mapping, but V7
only had 32 errno values; native errno values above this are going
to confuse the emulated application.

The following system calls are not implemented, and return an 
EPERM error to the application: phys(2), prof(2), ptrace(2),
acct(2), mount(2), umount(2), times(2). The following system
calls are ignored: lock(2), stime(2).

The following systems calls are only partially implemented:

    signal(2):		Only SIG_DFL and SIG_IGN are implemented.
    stty(2), gtty(2):	These should work, but V7 stty(1) doesn't work.
    ioctl(2):		Only enough to emulate stty(2) amd gtty(2).

The emulated applications use the native filesystem. Native filenames bigger
than 14 characters are truncated to 14 characters before being passed to
the application. In a similar way, inode numbers bigger than 65,536 are
truncated modulo 65,536 before being passed to the application.

Limitations for 2.11BSD Emulation in Apout 2.2
----------------------------------------------

Flags passed as arguments to the 2.11 syscalls are promoted to 32-bit
ints and passed to the native syscall. The errno values on the native
system are not translated back to the 2.11 errno values. To find out
what syscalls have been implemented, grep for the word DONE in bsdtrap.c.

As at 7th January, 1999, the following 2.11 syscalls are not handled:

	S_GETSOCKOPT, S_SETSOCKOPT, S_SELECT,
	S_RECVMSG, S_SENDMSG, S_SENDTO, 
	S_SIGBLOCK, S_SIGPAUSE, S_SIGRETURN,
	S_SIGSETMASK, S_SIGSTACK, S_SIGVEC
