Subject: sunos compatibility
To: None <>
From: Adam Glass <>
List: port-sun3
Date: 02/20/1994 13:36:44
someone asked at some point whether the fact that sunos passes the
syscall # on the stack, and bsd passes it in d0 was a problem.  I'd
quote the mail directly but my mail archives got scrunged.

This isn't a problem because what mode (NetBSD, SunOS compat, HPUX
compat) a process is to run in is determined on exec() of that
process by looking at the magic #, particularly the MID section.

If the process is running in SunOS compat mode then it interprets the
system call appropriately, including getting the syscall # from the

One disadvantage of this approach is that it is impossible to mix and
match NetBSD and SunOS compat system calls in the same process.  If
you could, the semantics would just be sickening anyway and have
reperucussions on the machine-independence of the core code.

Adam Glass