Free Republic
Browse · Search
News/Activism
Topics · Post Article

To: NCjim
Sounds like a plan. I can remember avoiding the use of index registers because not all S/360s had them - was a priced feature, as was the decimal instruction set.

I worked on those. My recollection is that, while the decimal and floating point instruction sets were extra-cost options, all S/360s had index registers. However, not all S/360 instructions could use them. For instance, the Move Immediate instruction could not use an index register because the right half of the immediate byte took up the bit field that would have specified which index register to use.

Also, the assembler had a glitch with regard to index registers. If you were not using an index register, and you forgot to put a comma before your intended base register, the assembler would output an instruction that had an index register but no base register. Your program would still work, but would be slower because the CPU would waste an extra cycle adding in zero. Someone I knew wrote a utility program in assembly language to go through old source code and fix instances where coders had made that mistake.

153 posted on 07/22/2009 10:05:56 AM PDT by cynwoody
[ Post Reply | Private Reply | To 122 | View Replies ]


To: cynwoody

You’re right about the index registers. Below the S/360 Model 25 the instruction set was limited and I/O was different. The Model 20 was interesting to say the least. :-)

Only RX instructions have a position for an index register. For those instructions the storage address is specified as D2(X2,B2) - and as you note, the registers are positional such that for base+displacement, you have to code D2(,B2) to indicate the absence of an index register.


167 posted on 07/22/2009 11:31:48 AM PDT by NCjim ("Lies have to be covered up, truth can run around naked." - Johnny Cash)
[ Post Reply | Private Reply | To 153 | View Replies ]

Free Republic
Browse · Search
News/Activism
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson