HP-35/45 Simulator for PDP-8

Klemens Krause krause at informatik.uni-stuttgart.de
Wed Sep 14 08:27:28 CDT 2016


On Tue, 13 Sep 2016, Doug Ingraham wrote:

>
> Not bad but I realized even more was possible.
>
>
>   31 00210  0000  BSWI,   .-.             /ENTRY POINT
>   32 00211  3174          DCA SAVEAC
>   33 00212  7430          SZL             /REMEMBER LINK STATE
>   34 00213  1176          TAD C0100       /PRE ROTATE LINK POSITION
>   35 00214  7100          CLL             /NEED THE LINK CLEARED
>   36 00215  1174          TAD SAVEAC      /GET 0 XXX XXX YYY YYY
>   37 00216  0175          AND C7700       /    0 XXX XXX 000 000
>   38 00217  1174          TAD SAVEAC      /    X XXX XX0 YYY YYY
>   39 00220  7006          RTL             /    X XXX LYY YYY YXX
>   40 00221  7006          RTL             /    X XLY YYY YYX XXX
>   41 00222  7006          RTL             /    L YYY YYY XXX XXX
>   42 00223  5610          JMP I BSWI      /RETURN
>
> I realized I could add in the link with the first TAD and the result is the
> same so was able to eliminate the DCA SAVEL and

Nice idea, I needed some time to understand whats going on.
Application of the commutativity of addition:
PREROTLINK + XXXXXX + XXXXXX = XXXXXX + XXXXXX + PREROTLINK :-)

I found the next simplification:

BSWI,  0
        DCA SAVEAC
        RTR         / MOVE LINK TO THE PREROTATE POSITION
        RTR         / ELIMINATE C0100
        RTR         / LINK IS CLEARED BECAUSE AC WAS 0 AFTER DCA
        TAD SAVEAC
        AND C7700
        TAD SAVEAC
        RTL
        RTL
        RTL
        JMP I  BSWI
SAVEAC,0
C7700, 7700

Statistically, if 50% link is set, and 50% link is not set both
versions have identical speed, but one constant is eliminated.

> Doug Ingraham
> PDP-8 SN 1175
>

Klemens
PDP-8 SN 768



--

klemens krause
Stuttgarter KompetenzZentrum fyr Minimal- & Retrocomputing.
http://computermuseum.informatik.uni-stuttgart.de



More information about the cctech mailing list