Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

bool(3F)

MIL(3F)                              SysV                              MIL(3F)



NAME
     mil: ior, iand, not, ieor, ishft, ishftc, ibits, btest, ibset, ibclr,
     mvbits - FORTRAN Military Standard functions

SYNOPSIS
     integer i, k, l, m, n, len
     logical b

     i = ior(m, n)
     i = iand(m, n)
     i = not(m)
     i = ieor(m, n)
     i = ishft(m, k)
     i = ishftc(m, k, len)
     i = ibits(m, k, len)
     b = btest(n, k)
     i = ibset(n, k)
     i = ibclr(n, k)
     call mvbits(m, k, len, n, l)

DESCRIPTION
     mil is the general name for the bit field manipulation intrinsic
     functions and subroutines from the FORTRAN Military Standard (MIL-STD-
     1753).  ior, iand, not, ieor - return the same results as and, or, not,
     xor as defined in bool(3F).

     ishft, ishftc - m specifies the integer to be shifted.  k specifies the
     shift count.  k > 0 indicates a left shift.  k = 0 indicates no shift.  k
     < 0 indicates a right shift.  In ishft, zeros are shifted in.  In ishftc,
     the rightmost len bits are shifted circularly k bits.  If k is greater
     than the machine word-size, ishftc will not shift.

     Bit fields are numbered from right to left and the rightmost bit position
     is zero.  The length of the len field must be greater than zero.

     ibits - extract a subfield of len bits from m starting with bit position
     k and extending left for len bits.  The result field is right justified
     and the remaining bits are set to zero.

     btest - The kth bit of argument n is tested.  The value of the function
     is .TRUE. if the bit is a 1 and .FALSE. if the bit is 0.

     ibset - the result is the value of n with the kth bit set to 1.

     ibclr - the result is the value of n with the kth bit set to 0.

     mvbits - len bits are moved beginning at position k of argument m to
     position l of argument n.

SEE ALSO
     bool(3F).

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