[Info-vax] Whither VMS?

glen herrmannsfeldt gah at ugcs.caltech.edu
Fri Oct 9 21:20:50 EDT 2009


Michael Kraemer <M.Kraemer at gsi.de> wrote:
< glen herrmannsfeldt schrieb:
 
<> For the PDP-11 I probably believe null termination is faster.
<> Not for most other processors.  For S/360, for example, you
<> would have add a specific test as IC, I believe, doesn't set
<> the flag bits.  For S/370, ICM does, but it may or may not
<> be faster.  
 
< Sure? If rusty memory serves me right,
< IC is "insert character" and ICM "insert character under mask",
< the latter could be used to perform byte swaps and such.
< For testing single bytes CLI is the instruction of choice.
< Main difference of S/3x0 to PDP,VAX,68K is the lack of
< auto-increment/decrement.

Yes, IC doesn't set the condition code, but ICM does.

The OP wants, for example, to do strcpy() with a loop
only testing the value of the character moved.  

For counted strings you would more likely use MVC or MVCL,
but you could do it with an IC/STC loop, maybe with BXLE
for the loop instruction, indexing off the loop register.

For a null terminated loop you couldn't use MVC or MVCL, 
but could use IC, LTR, STC, LA (increment the index), BNZ
to complete the loop.  (LA doesn't change the condition
code, either.)   (Faster might be find the length of the
source, then MVC or MVCL to move it.)

For VAX, I suppose you could do MOV with autoincrement
on source and destination followed by a conditional
branch.  Again, counting the source and using MOVC
might be faster.

To reduce instruction count (which may or may not be
faster) for null terminated strings you need both
autoincrement addressing and to set the flags based
on the character moved.

For z/Architecture (successor to S/360, S/370, XA/370, 
and ESA/390) there is MVST.  That is, strcpy() in one
instruction.  (The terminating character is specified
in R0, and doesn't have to be '\0'.)

-- glen



More information about the Info-vax mailing list