![](http://wwwinfo.cern.ch/icons/index_motif.gif)
Next: Technical details
Up: EPIO
Previous: User Routines
These routines will have to be provided by the user when he
installs the package on his computer, if no version for his computer yet
exists (see list in chapter
).
The source and target word positions in some of these routines
are given in 16-bit word counts.
It should be stressed that, due to different representation in different
computers, floating and integer type conversion have to be called
separately.
CALL W16MOV (SOURCE,N1,TARGET,N2,N3)
Moves 16-bit words in packed form.
- Input parameters:
-
- SOURCE
- source array
- N1
- starting 16-bit word in source
- TARGET
- target array
- N2
- starting 16-bit word in target
- N3
- no. of 16-bit words to move
CALL BLO8W (SOURCE,N1,TARGET,N2,N3)
Blows (unpacks) 8-bit words into machine words.
- Input parameters:
-
- SOURCE
- array containing 8-bit words in packed form
- N1
- first 8-bit word in source to blow
- TARGET
- target array for unpacked 8-bit words
- N2
- TARGET(N2) will contain first unpacked word
- N3
- no. of 8-bit words to unpack
CALL BUN8W (SOURCE,N1,TARGET,N2,N3)
Bunches (packs) 8-bit words (right adjusted, zero filled)
into a continuous bit string.
- Input parameters:
-
- SOURCE
- array containing 8-bit words in unpacked form
- N1
- first 8-bit word in source to packed
- TARGET
- target array for packed 8-bit words
- N2
- first 8-bit word in target to pack into
- N3
- no. of 8-bit words to pack
CALL BLO16W (SOURCE,N1,TARGET,N2,N3)
Blows (unpacks) 16-bit words into machine words.
- Input parameters:
-
- SOURCE
- array containing 16-bit words in packed form
- N1
- first 16-bit word in source to blow
- TARGET
- target array for unpacked 16-bit words
- N2
- TARGET(N2) will contain first unpacked word
- N3
- no. of 16-bit words to unpack
CALL BUN16W (SOURCE,N1,TARGET,N2,N3)
Bunches (packs) 16-bit words (right adjusted, zero filled)
into a continuous-bit string.
- Input parameters:
-
- SOURCE
- array containing 16-bit words in unpacked form
- N1
- first 16-bit word in source to packed
- TARGET
- target array for packed 16-bit words
- N2
- first 16-bit word in target to pack into
- N3
- no. of 16-bit words to pack
CALL BLO32W (SOURCE,N1,TARGET,N2,N3)
Blows (unpacks) 32-bit words into machine words.
Important remark: Counts partly in 16-bit words.
- Input parameters:
-
- SOURCE
- array containing 32-bit words in packed form
- N1
- first 32-bit word in source to blow
- TARGET
- target array for unpacked 32-bit words
- N2
- TARGET(N2) will contain first unpacked word
- N3
- no. of 32-bit words to unpack
CALL BUN32W (SOURCE,N1,TARGET,N2,N3)
Bunches (packs) 32-bit words (right adjusted, zero filled)
into a continuous-bit string.
Important remark: Counts partly in 16-bit words.
- Input parameters:
-
- SOURCE
- array containing 32-bit words in unpacked form
- N1
- first 32-bit word in source to packed
- TARGET
- target array for packed 32-bit words
- N2
- first 32-bit word in target to pack into
- N3
- no. of 32-bit words to pack
IVAL=IWD16 (A,N)
Function returns the 16-bit word no. N of string A.
The first 16-bit word coincides with the start of A.
The following routines are optional, but useful when data are written
in IBM integer or floating format.
CALL CTOIBM (*ARRAY*,NW,MODE)
- Input/Output buffer:
-
- ARRAY
- On input contains words to be converted to IBM format.
After conversion it will contain the IBM formatted
words right adjusted, zero filled after the call.
- Input parameters:
-
- NW
- number of words to be converted
- MODE
- Conversion mode
- 1:
- convert to 16-bit (signed) IBM integers. Conversion of
unsigned integers before writing is not necessary (they
must not be longer than 16-bit, of course)
- 2:
- convert to 32-bit IBM integers.
- 3:
- convert to 32-bit IBM floating.
CALL CFRIBM (ARRAY,NW,MODE)
The routine converts from IBM format to local machine format. The
input has to be right adjusted, zero filled in ARRAY.
The arguments are the same as for CTOIBM above.
CALL CFRASC (ARRAY,NW)
The routine converts from ASCII character to local character format.
ARRAY contains NW ASCII characters,
in the form of one character (per
word, right adjusted, zero filled). The conversion is performed in place.
CALL CTOASC (ARRAY,NW)
Inverse action of CFRASC.
CALL SFRASC (SOURCE,N1,TARGET,N2,NCH)
Converts a Hollerith string from ASCII to EBCDIC (IBM internal)
SFRASC converts a string of 8-bit ASCII characters
into a string of 6-bit display characters.
Converts a Hollerith string from external ASCII to
internal ASCII, i.e. on VAX performs byte swapping only.
By making source and target, and N1 and N2 identical, the routine
can be used for byte swapping only (identical to STOASC).
- Input parameters:
-
- SOURCE
- array containing the ASCII string
- N1
- first character in source to convert
- TARGET
- array receiving the EBCDIC string
- N2
- first character position of converted string in target
- N3
- number of characters to convert
The routine allows the simultaneous conversion and
concatenation of a string.
On VAX, IBM (not CDC !), source and
target may overlap as long as N2\leq
N1.
CALL STOASC (SOURCE,N1,TARGET,N2,NCH)
Converts a Hollerith string from EBCDIC (IBM internal) to ASCII
STOASC converts a string of CDC display characters
into a string of 8-bit ASCII characters.
Converts a Hollerith string from external ASCII to internal ASCII,
i.e. on VAX performs byte swapping only. By making source and target,
and N1 and N2 identical,
the routine can be used for byte swapping only.
- Input parameters:
-
- SOURCE
- array containing the EBCDIC string
- N1
- first character in source to convert
- TARGET
- array receiving the ASCII string
- N2
- first character position of converted string in target
- N3
- number of characters to convert
The routine allows the simultaneous conversion and
concatenation of a string.
On VAX, IBM (not CDC !), source and
target may overlap as long as N2\leq
N1.
![](http://wwwinfo.cern.ch/icons/index_motif.gif)
Next: Technical details
Up: EPIO
Previous: User Routines