Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

hppac(3X)

NAME

HPPACADDD, HPPACCMPD, HPPACCVAD, HPPACCVBD, HPPACCVDA, HPPACCVDB, HPPACDIVD, HPPACLONGDIVD, HPPACMPYD, HPPACNSLD, HPPACSLD, HPPACSRD, HPPACSUBD − 3000-mode packed-decimal library

SYNOPSIS

#include <hppac.h>

void HPPACADDD(

unsigned char ∗operand2,
int op2digs,
unsigned char ∗operand1,
int op1digs,
enum HPPAC_CC ∗compcode,
int ∗pacstatus

);

void HPPACCMPD(

unsigned char ∗operand1,
int op1digs,
unsigned char ∗operand2,
int op2digs,
enum HPPAC_CC ∗compcode,
int ∗pacstatus

);

void HPPACCVAD(

unsigned char ∗target,
int targetdigs,
unsigned char ∗source,
int sourcedigs,
enum HPPAC_CC ∗compcode,
int ∗pacstatus

);

void HPPACCVBD(

unsigned char ∗target,
int targetdigs,
unsigned short ∗source,
int sourcewords,
enum HPPAC_CC ∗compcode,
int ∗pacstatus

);

void HPPACCVDA(

unsigned char ∗target,
int targetdigs,
unsigned char ∗source,
int sign_control,
enum HPPAC_CC ∗compcode,
int ∗pacstatus

);

void HPPACCVDB(

unsigned short ∗target,
unsigned char ∗source,
int sourcedigs,
enum HPPAC_CC ∗compcode,
int ∗pacstatus

);

void HPPACDIVD(

unsigned char ∗operand2,
int op2digs,
unsigned char ∗operand1,
int op1digs,
enum HPPAC_CC ∗compcode,
int ∗pacstatus

);

void HPPACLONGDIVD(

unsigned char ∗operand2,
int op2digs,
unsigned char ∗operand1,
int op1digs,
enum HPPAC_CC ∗compcode,
int ∗pacstatus

);

void HPPACMPYD(

unsigned char ∗operand2,
int op2digs,
unsigned char ∗operand1,
int op1digs,
enum HPPAC_CC ∗compcode,
int ∗pacstatus

);

void HPPACNSLD(

unsigned char ∗operand2,
int op2digs,
unsigned char ∗operand1,
int op1digs,
int ∗shift_amt,
enum HPPAC_CC ∗compcode,
int ∗pacstatus,
int ∗carry

);

void HPPACSLD(

unsigned char ∗operand2,
int op2digs,
unsigned char ∗operand1,
int op1digs,
int shift_amt,
enum HPPAC_CC ∗compcode,
int ∗pacstatus,
int ∗carry

);

void HPPACSRD(

unsigned char ∗operand2,
int op2digs,
unsigned char ∗operand1,
int op1digs,
int shift_amt,
enum HPPAC_CC ∗compcode,
int ∗pacstatus

);

void HPPACSUBD(

unsigned char ∗operand2,
int op2digs,
unsigned char ∗operand1,
int op1digs,
enum HPPAC_CC ∗compcode,
int ∗pacstatus

);

DESCRIPTION

This set of calls invokes the library functions for emulating 3000-mode (MPE V/E) packed-decimal operations.  These functions are in library libcl which is searched when the option -lcl is used with cc(1) or ld(1).

HPPACADDD() Performs packed-decimal addition. 

HPPACCMPD() Compares two packed-decimal numbers. 

HPPACCVAD() Converts an ASCII representation to packed-decimal. 

HPPACCVBD() Converts a binary representation to packed-decimal. 

HPPACCVDA() Converts a packed-decimal number to ASCII. 

HPPACCVDB() Converts a packed-decimal number to binary. 

HPPACDIVD() Performs packed-decimal division. 

HPPACLONGDIVD()
Performs packed-decimal division (alternate routine).

HPPACMPYD() Performs packed-decimal multiplication. 

HPPACNSLD() Performs a packed-decimal normalizing left shift. 

HPPACSLD() Performs a packed-decimal left shift. 

HPPACSRD() Performs a packed-decimal right shift. 

HPPACSUBD() Performs packed-decimal subtraction. 

For all operations, the value returned in the variable to which the compcode argument points is one of the following values of type enum HPPAC_CC:

HPPAC_CCG Result > 0 or operand1 > operand2

HPPAC_CCL Result < 0 or operand1 < operand2

HPPAC_CCE Result == 0 or operand1 == operand2

For all operations, the value returned in the variable to which the pacstatus argument points is one of the following values of type enum HPPAC_STATUS.  Their meanings are intended to be obvious:

HPPAC_NO_ERROR

HPPAC_DECIMAL_OVERFLOW

HPPAC_INVALID_ASCII_DIGIT

HPPAC_INVALID_PACKED_DECIMAL_DIGIT

HPPAC_INVALID_SOURCE_WORD_COUNT

HPPAC_INVALID_DECIMAL_OPERAND_LENGTH

HPPAC_DECIMAL_DIVIDE_BY_ZERO

AUTHOR

The HPPAC library was developed by HP. 

SEE ALSO

Compiler Library/XL Reference Manual

Hewlett-Packard Company  —  HP-UX Release 10.20:  July 1996

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