[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Simulator and RSTS v7.0 Update


I made some more progress with RSTS V7, but have come across what looks like
a bug in the simulator.  The reason Chuck Cranor was unable to get BUILD to
work is the same reason that DIRECT was not working for me.  It is very
strange, but all integer constants between 128% and 255% are interpreted by
BASIC-PLUS as 0%.  If you type "PRINT 128%" it responds with 0.

At first I thought it was because of the C compiler I used to build the
simulator, but I've tried it now on both Win95 using Visual C++ and Linux
using GNU C++.
It seems like it is only the BASIC-PLUS lexical scanner that is affected.
can type "INPUT X%" and type 128 and "PRINT X%" and get 128.  Math
seems to work too.  I haven't tried it yet, but I suspect we can get the
working by simply searching for any constant between 128% and 255% and
removing the % sign.

I guess it is possible that there is a corrupted section of code in the
BASIC-PLUS interpreter, but given the behavior, I suspect it is more likely
that there
is an instruction that isn't being interpreted correctly. I suspect it has
to do with
a byte instruction that is not setting the condition codes correctly.  The
that come out as zero are all numbers that can be stored in a single byte,
have the sign bit on in the byte.  I know the BASIC-PLUS interpreter stores
small integers as bytes in the PPCODE that is generated.   I'm looking
Bob Supnik's code and I have an old PDP-11/70 processor handbook to see if
I can figure out what is going on.

Do you still have contact with Bob Supnik?  He might be interested in
us debug the problem.

By the way, I was the one that found Chuck Cranor.  I did an Alta Vista
on RSTS and came across his web page.  His background is very similar to
mine, but almost exactly a decade later.  Some very strange parallels.  He
knows my brother and is good friends with one of my college roommates.

Regards, Gary