Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 (Tek) 9/28/84 based on 9/17/84; site hammer.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!houxm!vax135!cornell!uw-beaver!tektronix!orca!hammer!steveh From: steveh@hammer.UUCP (Stephen Hemminger) Newsgroups: net.emacs Subject: Re: GNU Emacs on the Sun Message-ID: <1164@hammer.UUCP> Date: Wed, 10-Apr-85 11:37:51 EST Article-I.D.: hammer.1164 Posted: Wed Apr 10 11:37:51 1985 Date-Received: Thu, 11-Apr-85 07:35:24 EST References: <364@wdl1.UUCP> Reply-To: steveh@hammer.UUCP (Stephen Hemminger) Organization: Tektronix, Wilsonville OR Lines: 55 Keywords: GNU I am in the process of porting it to the Tektronix NS32000 workstations. Here are some observations: unexec.c Got this to work by rewriting the read_u code, see below. Same type of code should work on a 68000 crt0.c Needed different code, just wrote a six line assembly routine. null pointers. Display code derefence's null pointers a lot, thinking of either making a new crt0.o with a page of null's at the front (ugly), or trap it some way. /* **************************************************************** * read_u * * Get the u structure (from memory.) */ #if !defined(ns16000) static read_u() { u = *(struct user *)UADDR; /* Simple, when it's in core... */ return 0; } #else /* on Tektronix NS32000 workstations */ static read_u() { register int kmem; struct nlist nl[2]; /* nlist is a union in a.out.h so can't initialize directly */ nl[0].n_un.n_name = "_u"; nl[1].n_un.n_name = 0; if(knlist("/dev/cvt",nl) != 0) { /* knlist is a funky nlist() */ PERROR("reading namelist"); return -1; } if( (kmem = open("/dev/kmem", 0)) < 0) { PERROR("can't open kmem"); return -1; } lseek(kmem, (long) nl[0].n_value, 0); read(kmem, (char *) &u, sizeof u); close(kmem); return 0; } #endif