[Simh] CMP R3,(R3)+

Rhialto rhialto at falu.nl
Sun Jul 29 16:59:56 EDT 2018


On Sun 29 Jul 2018 at 10:42:19 +0000, Lars Brinkhoff wrote:
> I have a very small debugger for the GT40 called URUG, or micro RUG.  It
> has two troublesome instructions: CMP R3,(R3)+ and equivalent with R4.
> I suppose SIMH will run it fine even though there's a hazard?

In the "PDP-11 Architecture Handbook 1983-84" (EB-23657-18) there is a
convenient appendix listing the differences between various
implementations of the PDP-11.

OPR %R,(R)+ is listed as case 1. The difference between cases is whether
R is incremented before using it as the source operand. Apart from that
no issues are listed, so if you don't care about that difference there is
no problem.

> Would there be any possible downside to using TST (R3)+ instead?

Both instructions affect all 4 flags, so no code can already depend on
preserving any. 

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- Wayland: Those who don't understand X
\X/ rhialto/at/falu.nl      -- are condemned to reinvent it. Poorly.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: not available
URL: <http://mailman.trailing-edge.com/pipermail/simh/attachments/20180729/5d238f51/attachment.sig>


More information about the Simh mailing list