Re: PDP-8 Code Optimization (was Re: HP-35/45 Simulator for PDP-8)

2016-09-14 Thread Pete Turnbull
On 14/09/2016 17:02, Vincent Slyngstad wrote: From: Pete Turnbull: Wednesday, September 14, 2016 7:20 AM ISZ ovfsum/ if yes, 3777 -> 4000 (MIN INT) CLA / really a NOP You should be able to remove the CLA, as that ISZ won't skip Of course! LOL! I must have spent half an hour

Re: PDP-8 Code Optimization (was Re: HP-35/45 Simulator for PDP-8)

2016-09-14 Thread Vincent Slyngstad
From: Pete Turnbull: Wednesday, September 14, 2016 7:20 AM ISZ ovfsum/ if yes, 3777 -> 4000 (MIN INT) CLA / really a NOP You should be able to remove the CLA, as that ISZ won't skip and the AC is already clear. Yours is definitely better, I think, as the XOR business

Re: PDP-8 Code Optimization (was Re: HP-35/45 Simulator for PDP-8)

2016-09-14 Thread Pete Turnbull
On 14/09/2016 13:17, Vincent Slyngstad wrote: From: Kyle Owen: Tuesday, September 13, 2016 7:12 PM TAD OVFA /A XOR B AND OVFB CMA IAC TAD OVFA TAD OVFB Sigh. There seems to be an issue with my implementation of XOR. Before the CMA IAC there needs to be CLL RAL, to reposition the carries

Re: PDP-8 Code Optimization (was Re: HP-35/45 Simulator for PDP-8)

2016-09-14 Thread Pete Turnbull
On 14/09/2016 03:12, Kyle Owen wrote: Need some more optimization fun? :) Vince and I were working on some code to add two signed 12 bit numbers and detect overflow, returning MAX_INT or MIN_INT in AC in the case of overflow, or the sum in AC otherwise. Here's what Vince came up with so far: >

Re: PDP-8 Code Optimization (was Re: HP-35/45 Simulator for PDP-8)

2016-09-14 Thread Vincent Slyngstad
From: Kyle Owen: Tuesday, September 13, 2016 7:12 PM TAD OVFA /A XOR B AND OVFB CMA IAC TAD OVFA TAD OVFB Sigh. There seems to be an issue with my implementation of XOR. Before the CMA IAC there needs to be CLL RAL, to reposition the carries before subtracting them. Both XORs are affected.

PDP-8 Code Optimization (was Re: HP-35/45 Simulator for PDP-8)

2016-09-13 Thread Kyle Owen
On Tue, Sep 13, 2016 at 3:38 PM, Doug Ingraham wrote: > > Thanks for an interesting bit of optimization! Need some more optimization fun? :) Vince and I were working on some code to add two signed 12 bit numbers and detect overflow, returning MAX_INT or MIN_INT in AC