#  $Id: README,v 1.1.1.1 2022/12/27 22:06:24 pm Exp $


The library,  libascii.tar.Z, was downloaded from:

http://www-03.ibm.com/systems/z/os/zos/features/unix/libascii.html

Unpacking the archive results in EBCDIC encoded source code.  This
code appears to be intended for use on IBM mainframe systems.  A
typical use would be to make ASCII source codes available for EBCDIC systems
by providing a library, libascii.a to link to.

I used the Perl ebcdic to ascii package from cpan

http://search.cpan.org/~cxl/Convert-EBCDIC-0.06/lib/Convert/EBCDIC.pm

to convert the ebcdic source code to ascii.  The bash script, gorun, calls
the perl script, Ebcdic2Ascii, and produced the ascii versions included here.
Only the codes required for my SEGY conversion software have been included.  The
majority of the libascii source code is of no use in this application, and will
not compile anyway on a Linux system.  As luck would have it, xdrfloa.c is useful
and compiles without any modification. 

The Makefile.am leads to a library, libibm.a and/or shared library for linking
to.  The useful parts are as follows:

  The function
ConvertIEEEToFloat(src,dst)
will produce the IBM floating point needed for SEGY exchange format,
used by my C program bcnv.c in the bsegy directory.

  The function
ConvertFloatToIEEE(src,dst)
will produce IEEE from floating points read from a SEGY file.

Because IBM main frames are big endian, and Linux PC's are little endian,
some byte swapping may be necessary as is done in bcnv.c

P. Michaels
<pm@cgiss.boisestate.edu>


