All,

I am looking at code that puts data into the RKWC register (177410). I am getting some interesting results and I would like to know what y'all think about the results.

The code I am analyzing is the RK05 bootloader code from "Setting up Unix - Sixth Edition" and I have completed the analysis and am satisfied with the understanding I have gained from that process. However, whenever I try to examine the contents of the RK buffers after executing instructions that modify them, they always appear to be 00000. Is this normal?

I set out to see if the behavior was consistent.

I wrote some machine code (comments added after sim run) to put a value into the RKWC location and HALT.

PDP-11 simulator V4.0-0 Beta        git commit id: 0f43551d
sim> d 10000 012737 ; MOV 1,(PC)+
sim> d 10002 177440 ; -340
sim> d 10004 177410 ; RKWC RK word counter register
sim> d 10006 000000 ; HALT

sim> g 10000

HALT instruction, PC: 010010 (HALT)

Then I examined the buffer:

sim> ex 177410
177410:    000000

Shouldn't 177410 contain 177440?

Next, I added an instruction to move the contents of 177410 into R0 before HALTing:

Add an instruction to move the contents of 177410 into R0
PDP-11 simulator V4.0-0 Beta        git commit id: 0f43551d
sim> d 10000 012737
sim> d 10002 177440
sim> d 10004 177410
sim> d 10006 013700
sim> d 10010 177410
sim> d 10012 000000
sim>
sim> g 10000

HALT instruction, PC: 010014 (HALT)

I examined RKWC and R0:

sim> ex 177410
177410:    000000
sim> ex r0
R0:    177440

Well, 177410 still contains 0, but R0 contains 177440, some improvement.

Finally, I tried loading the memory location directly:
sim> d 177410 030303
sim> ex 177410
177410:    030303

Huh? That was totally unexpected. What is going on?

Thanks,

Will
_______________________________________________
Simh mailing list
[email protected]
http://mailman.trailing-edge.com/mailman/listinfo/simh

Reply via email to