[comp.sys.nsc.32k] setjmp/longjmp

garyj@neptun.pcs.com (Gary Jennejohn) (10/18/90)

Hi Bruce, et al.,

Thanks to Bruce for his thoughts on setjmp/longjmp. I tend to agree, but I'm
also rather conservative and take the approach that the general purpose
registers, at least, should be saved. This is what I did in my setjmp/
longjmp. I didn't do anything with the floating point registers. In my
opinion setjmp/longjmp shouldn't be misused as though they were save/resume
in the kernel.

What I mean by standalone is: a copy of the monitor is downloaded to
memory and then I jump to it. The monitor in memory then takes the place
of the one in EPROM. All traps, interrupts, etc., are handled by the
memory-resident monitor. It's with the memory-resident monitor that I was
having problems, but they've since disappeared. Apparently I was doing
something somewhere in the memory test code that was leading to problems
when I did a longjmp.

I now have the memory tests integrated into the monitor which I've tested
memory-resident. I fear that the monitor may now be too big to fit into
our 32k EPROM, but I'm not 100% sure.

Gary

george@wombat.bungi.COM (George Scolaro) (10/18/90)

[In the message entitled "setjmp/longjmp" on Oct 17,  9:28, Gary Jennejohn writes:]
> 
> I now have the memory tests integrated into the monitor which I've tested
> memory-resident. I fear that the monitor may now be too big to fit into
> our 32k EPROM, but I'm not 100% sure.
> 
> Gary

Well, you can always do a simple hack to the pc532. Pin 1 of the EPROM is
currently tied to VCC, via a trace on the back of the board (it actually
goes from pin 1 of the EPROM to the VCC pin of the bypass cap right above
the EPROM). This was done on purpose in case we ever had to go for a bigger
EPROM (I could have made pin 1 connect internally to the power plane...). Cut
the trace and run a wire from pin 1 to A15 (e.g. on the back of the cpu),
then you can use a 27x512 (64KBytes).

best regards,

-- 
George Scolaro
george@wombat.bungi.com                [37 20 51 N / 122 03 07 W]