[TUHS] PDP-11 questions

Johnny Billquist bqt at update.uu.se
Mon Jan 25 13:07:16 AEST 2016


On 2016-01-25 02:11, jnc at mercury.lcs.mit.edu  (Noel Chiappa) wrote:
>
>      > The later M9301 (see disassembly of the contents here:
>      >http://ana-3.lcs.mit.edu/~jnc/tech/pdp11/M9301-YA.mac
>      > of one variant) didn't clear memory either
>
> OK, so_my_  memory is failing! That code does in fact test the memory.
>
> (Although, looking at it, I can't understand how it works; after writing the
> contents of R3 into the memory section it it asked to test, it complements the
> test value in R3, before comparing it with the memory it just wrote with R3,
> to make sure they are the same. Maybe there's an error in the dis-assembly?)

Read the code again, you missed it. :-)
The code first writes one value into memory (R3), then complements R3, 
and for each location checks that the memory is *not* equal to R3, and 
then writes R3 and checks that it now matches. Essentially checking that 
it can be changed into a wanted value in time. And it does it two times. 
First zeroing, and then writing ones, and then back to zeroes again, so 
yes, the memory will be left containing all zeros, except for what 
memory isn't tested.

> Anyway, it should have left the memory mostly containing all 0's.

Indeed.

	Johnny

-- 
Johnny Billquist                  || "I'm on a bus
                                   ||  on a psychedelic trip
email: bqt at softjar.se             ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol



More information about the TUHS mailing list