It's a bug, and it's fixed in 3.8-2:

05-Jan-11 RMS Fixed bug in deposit stride for numeric input (John Dundas)

If you want to edit the code, the fix is in dep_addr:

GET_RADIX (rdx, dptr->dradix);
if ((reason = parse_sym (cptr, addr, uptr, sim_eval, sim_switches)) > 0) {
    sim_eval[0] = get_uint (cptr, rdx, mask, &reason);
    if (reason != SCPE_OK)
        return reason;
    reason = dfltinc; <<< add this line >>>
    }
count = (1 - reason + (dptr->aincr - 1)) / dptr->aincr;

------------------------------------------
Message: 1
Date: Wed, 15 Jun 2011 10:47:37 -0500
From: Jon Elson<[email protected]>
To: [email protected]
Subject: [Simh] pdp-11 id command quirk
Message-ID:<[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hello,

I want to use the pdp-11 sim of simh to teach my kids some
machine-language programming.
I have it compiled and running on a Linux system.  When using
interactive deposit
in the PDP-11 simulator, it increments by single byte addresses, so you
get :

PDP-11 simulator V3.8-1
sim>  id 1000-1004
1000:   1234
1001:   2345
1002:   3456
1003:   4567
1004:   5670
sim>  e 1000-1004
1000:   002345
1002:   004567
1004:   005670
so, you see that only every other deposit address actually wrote to
memory, and the examine
command properly increments by words. If there is a by-word switch to
the id command, I couldn't
figure it out from the source or help text. (I do see that id -c writes
2 ASCII characters to even addresses,
and writing assembler mnemonics also works, but numeric values increment
by one.)

I tried the same thing on the vax780 sim, and it works fine, depositing
32-bit values on longword
addresses, and then examining them just fine.

If there is an option switch that makes it work correctly, I was unable
to find that by inspecting the source
or the documentation, or searching the simh archives.

Thanks,

Jon


------------------------------

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

End of Simh Digest, Vol 91, Issue 6
***********************************

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

Reply via email to