Subject: SunOS binary compatibility
To: None <glass@sun-lamp.cs.berkeley.edu>
From: Gordon W. Ross <gwr@jericho.mc.com>
List: port-sun3
Date: 02/18/1994 11:41:40
> Date: Fri, 18 Feb 1994 07:44:03 -0800
> From: Adam Glass <glass@sun-lamp.cs.berkeley.edu>
> 
> In order to get more people working on the port, including writing
> device drivers, I've been trying to improve the endgame, i.e getting
> the port to run /sbin/init properly, execing a single-user shell, and
> giving that highly significant '#' prompt.
> 
> In the past I had been trying to do this via the sunos compatibility
> code but it had become too difficult to debug, and I had left it for
> another day.  Recently though i switched to using a NetBSD /sbin/init
> compiled on NetBSD/mac using our 8k page MID format.

I looked at locore.s:icode and was surprised to see the system call
number being put in a register and not on the stack. The SunOS libc
syscalls put the system call number on the stack, i.e.

__exit:
	pea	0x01:w
	trap	#0
_execve:
	pea	0x3b:w
	trap	#0

I assume that to run SunOS binaries, we will need to use the same
system call trap calling conventions.  Is this a bug?

> Anyway, I hope to report a shell-prompt in the next few days.

Looking forward to it!
Gordon

------------------------------------------------------------------------------