next up previous index
Next: M426 Unpack Full Up: CERNLIB Previous: M422 Handling Packed

M423 Increment a Byte of a Packed Vector

Routine ID: M423
Author(s): J. Zoll, P. RastlLibrary: KERNLIB
Submitter: Submitted: 28.01.1971
Language: Fortran or AssemblerRevised: 16.09.1991

INCBYT allows incrementing a specified byte of a packed byte vector (cf. PACBYT (M422)).

Structure:

FUNCTION subprogram
User Entry Names: INCBYT

Usage:

    LOST = INCBYT(INC,MX,JX,MPACK)
The 3-word vector MPACK specifies the packing parameters (much like for PACBYT (M422), but NBITS=0 is not allowed):
MPACK(1)
≡NBITS , number of bits per byte.
MPACK(2)
≡INWORD , number of bytes per word.
MPACK(3)
≡MAXCAP , the maximum capacity of any byte, 2**NBITS-1.
INCBYT adds the increment INC into the JX'th byte of the packed byte-vector MX and returns any byte overflow, i.e. the part of INC which cannot be added into the byte, because it now contains MPACK(3).

M426


Janne Saarela
Mon Apr 3 15:06:23 METDST 1995