* interp.c (BUSERROR): New macro.

([r|w][bwl]at[little|big]) New functions.
	(sim_resume): If GO32 check for interrupt every now
	and again.  Decrement PC if SIGBUS seen.
	* run.c (main):  Return result of simulated _exit.
This commit is contained in:
Steve Chamberlain
1994-12-29 05:28:20 +00:00
parent 582d2a4d37
commit 4d0be1f5d4
3 changed files with 421 additions and 199 deletions

View File

@@ -113,10 +113,11 @@ main (ac, av)
if (verbose)
sim_info (0);
/* Find out what was in r0 and return that */
/* Assume we left through the exit system call,
in which case r5 has the exit code */
{
unsigned char b[4];
sim_fetch_register (0, b);
sim_fetch_register (5, b);
return b[3];
}