4 One of the V5 C compiler passes requires -DZERO_MEMORY: it must not
5 initialise a variable properly. V5 and V6 ar(1) do not close a file
6 descriptor after writing has finished. If Apout is compiled with
7 stream buffering, when this file is copied it is truncated. Either
8 turn off Apout stream buffering (a performance penalty), or patch
9 ar.s to behave itself. The patch is:
11 *** ar.s.orig Thu Jan 14 09:40:46 1999
12 --- ar.s Thu Jan 14 09:41:12 1999
19 + mov tfo,r0 / need to close before reading
26 Floating-point Limitations
27 --------------------------
29 PDP-11 doubles are treated as floats. FEA/FEC don't exist.
30 FP errors are not dealt with. Mistrust FP results for now.
32 Limitations for 7th Edition Emulation in Apout 2.3
33 --------------------------------------------------
35 Note that V5 and V6 binaries are considered V7 binaries. Overlay
36 binaries (type 0405) are not recognised.
38 The errno values on the native system are not translated back to
39 the V7 errno values. There is normally a 1-to-1 mapping, but V7
40 only had 32 errno values; native errno values above this are going
41 to confuse the emulated application.
43 The following system calls are not implemented, and return an
44 EPERM error to the application: phys(2), prof(2), ptrace(2),
45 acct(2), mount(2), umount(2), times(2). The following system
46 calls are ignored: lock(2), stime(2).
48 The following systems calls are only partially implemented:
50 signal(2): Only SIG_DFL and SIG_IGN are implemented.
51 stty(2), gtty(2): These should work, but V7 stty(1) doesn't work.
52 ioctl(2): Only enough to emulate stty(2) amd gtty(2).
54 The emulated applications use the native filesystem. Native filenames bigger
55 than 14 characters are truncated to 14 characters before being passed to
56 the application. In a similar way, inode numbers bigger than 65,536 are
57 truncated modulo 65,536 before being passed to the application.
59 Limitations for 5th & 6th Edition Emulation in Apout 2.3
60 --------------------------------------------------------
62 There seems to be a bug in V5/V6 ctime() which stops dates after
63 November 1999 being displayed correctly. Apout works around this
64 problem by modifying dates returned from system calls to be in
65 the year 1998 if they are 1999 or later.
67 Limitations for 2.9BSD Emulation in Apout 2.3
68 ---------------------------------------------
70 At present, 2.9BSD binaries are treated as V7 binaries, so the limitations
71 above apply. This also means that overlays are not understood, and also the
72 2.9-specific system calls have not yet been implemented.
74 Limitations for 2.11BSD Emulation in Apout 2.3
75 ----------------------------------------------
77 Flags passed as arguments to the 2.11 syscalls are promoted to 32-bit
78 ints and passed to the native syscall. The errno values on the native
79 system are not translated back to the 2.11 errno values. To find out
80 what syscalls have been implemented, grep for the word DONE in bsdtrap.c.
82 The following 2.11 syscalls are not handled:
84 S_GETSOCKOPT, S_SETSOCKOPT, S_SELECT,
85 S_RECVMSG, S_SENDMSG, S_SENDTO,
86 S_SIGBLOCK, S_SIGPAUSE, S_SIGRETURN,
87 S_SIGSETMASK, S_SIGSTACK, S_SIGVEC
89 Limitations for 1st Edition Emulation in Apout 2.3
90 --------------------------------------------------
92 This is still in the experimental stages, with some problems with time
93 values. The KE11A emulation is also incomplete. However, the following
94 0405-magic binaries from Dennis Ritchie's s2.tar archive are known to work:
96 cat, cp, date, echo, ls, mkdir, sh, wc
98 Most of the others seem to work as well, but I haven't tested them completely.
99 The list of 0405-magic files on the s2 archive is:
127 The following 1st Edition system calls are not yet emulated: GTTY, STTY, TELL.
129 Limitations for 2nd Edition Emulation in Apout 2.3
130 --------------------------------------------------
132 The few 2nd Edition binaries with 0407-magic on the s2 archive can now
133 be run with Apout. Essentially, they receive the same environment as
134 the 1st Edition binaries, with a few small syscall differences. Note
135 that, at present, I don't have a copy of the V2 manuals, so I can
136 guarantee that 2nd Edition emulation still needs work.
138 However, the emulation is good enough to allow the C compiler on the s2
139 archive to compile the last1120c C compiler on Dennis Ritchie's homepage.
141 The list of 0407-magic files in the s2 archive is below. I have starred
142 those binaries that I know work with Apout.
144 * bin/as usr/fort/fc1
145 * bin/cc usr/fort/fc2
148 bin/find usr/jack/a.out
149 * bin/ld usr/jack/x.o
150 bin/maki * usr/lib/c0
152 * bin/size usr/lib/crt0.o
153 bin/strip usr/lib/fr0.o