Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mvbits(3F) — Sun WorkShop 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

MVBITS(3F)  —  FORTRAN LIBRARY ROUTINES

NAME

mvbits − move specified bits

SYNOPSIS

subroutine mvbits (src, ini1, nbits, des, ini2 )
integer src, ini1, nbits, des, ini2

DESCRIPTION

This routine moves bits from src starting with bit ini1, number of bits moved nbits, to des, starting with bit ini2. 

NOTES

To use this VMS routine, you need the −lV77 option.  If you use −lV77, then invoking idate() or time() gets the VMS version.  Usage:

INTEGER  src, ini1, nbits, des, ini2
...
CALL mvbits(src, ini1, nbits, des, ini2)

Restrictions:

ini1 + nbits ≤ 32
ini2 + nbits ≤ 32

Example:

demo$ cat  mvb1.f
∗ mvb1.f -- From src, initial bit 0, move 3 bits to   des, initial bit 3.
∗    src       des
∗ 543210 543210 <-- Bit numbers (VMS convention)
∗ 000111 000001 <-- Values before move
∗ 000111 111001 <-- Values after move
INTEGER src, ini1, nbits, des, ini2
DATA src, ini1, nbits, des, ini2
&          / 7,    0,      3,     1,     3 /
CALL mvbits ( src, ini1, nbits, des, ini2 )
WRITE (∗,"(5O3)") src, ini1, nbits, des, ini2
END
demo$ f77  −silent  mvb1.f  −lV77
demo$ a.out
  7  0 3 71  3
demo$

FILES

libF77.a, libV77.a

SEE ALSO

The FORTRAN Reference Manual.

Sun Release 4.1  —  Last change: 5 January 1994

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026