Path: utzoo!utgpu!cunews!bcars8!bnrgate!bigsur!bnr-rsc!hounsell From: hounsell@chekov.UU.NET (Rob Hounsell) Newsgroups: comp.sys.hp Subject: Xtank port and jmp_buf puzzle Keywords: xtank jmp_buf Message-ID: <3160@bnr-rsc.UUCP> Date: 1 Jun 90 15:08:59 GMT Sender: news@bnr-rsc.UUCP Reply-To: uunet!chekov!hounsell Organization: Northern Telecom, Ottawa, Canada Lines: 37 Folks, I may be doing this the hard way, but..... A friend sent me the source for xtank a while back. Unfortunately, it had no HPUX port in it, so off I went to port it myself. Things seem fine, EXCEPT for a section in thread.c (which controls the robot tanks) like so: /* Modify current state's stack pointer in jmp_buf state */ bufend = (unsigned int)buf + bufsize - 1 - sizeof(thd->state); /* Set stack pointer in jmp_buf to bufend. * This is extremely machine and OS dependent. * Often you can find out what register of the jmp_buf has the * stack pointer by looking in /usr/include/setjmp.h on your machine. */ #ifdef vax /* Vaxen */ bufend -= sizeof(Thread); thd->state[0] = bufend; #endif #if (defined(ibm032) || defined(ibm370)) /* IBM RT */ thd->state[0] = bufend; #endif etc..... The setjump.h for HPUX 6.5 running on HP300 series workstations does NOT give a clue what register to use, or how to set bufend. Can anyone suggest the correct values?? Rob +-----------------------------------------------------------------------------+ | Rob Hounsell | | | UUNET: ...!chekov!mcrae!hounsell | "You guys start coding, and I'll go | | BNR WAN: hounsell@nmerh6 | see what it is they need." | | PHONE: (613) 765-2904 | | | ESN: 395-2904 | Anon. | +-----------------------------------------------------------------------------+