It appears that Quadibloc <
jsa...@ecn.ab.ca> said:
>On Sunday, April 18, 2021 at 4:28:58 PM UTC-6, John Levine wrote:
>
>> The more mysterious question is why it subtracted the index rather than adding,
>
>Given that the index registers were loaded by a clear and subtract or load complement
>instruction, if it hadn't been for the OR, they wouldn't have had to document that the
>index registers were subtracted! That is, they could have pretended load complement
>was load, and then that subtracting the complement was adding the original value.
Well, the console lights would have given it away. On the 704 PAX and PDX loaded the
index registers directly, you had do do your own negating. I think the negating versions
were added later.
>Under some conditions, subtraction makes sense. To illustrate this with addition: load
>-5 into the index, and increment for each iteration, then you can test to end the loop with
>a simple 'branch on not zero', without having to compare to the loop count.
Whatever the rationale was, it doesn't seem to have been very
persuasive since the 704 series was as far as I know the first and
last use of subtracted index registers. The decimal 7070 used
locations 0001 to 0099 as index registers which were added. The
extremely complicated 7030 (STRETCH) had 15 index registers, added in
various complicated ways. S/360 had (still has, as zSeries) binary
double indexing with base and displacement registers.