h59560
s 00039/00000/00000
d D 1.1 83/01/20 11:13:34 tes 1 0
c date and time created 83/01/20 11:13:34 by tes
e
u
tes
mjb
U
t
T
I 1
SHORTINT function pck4b (nible1, nible2)
########################################################################
#                                                                      #
#          THIS MATERIAL IS CONFIDENTIAL AND IS FURNISHED UNDER        #
#          A WRITTEN LICENSE AGREEMENT.  IT MAY NOT BE USED,           #
#          COPIED OR DISCLOSED TO OTHERS EXCEPT IN ACCORDANCE          #
#          WITH THE TERMS OF THAT AGREEMENT.                           #
#                                                                      #
#          COPYRIGHT (C) 1982 GRAPHIC SOFTWARE SYSTEMS INC.            #
#          ALL RIGHTS RESERVED.                                        #
#                                                                      #
#     Function: Pack 2 4 bit nibles into one 8 bit byte                #
#                                                                      #
#     Input Parameters:                                                #
#            nible1 - byte which contains 4 bits for left half of      #
#                     output byte                                      #
#            nible2 - byte which contains 4 bits for right half of     #
#                     output byte                                      #
#                                                                      #
#     Output Parameters:                                               #
#            bytout - output byte which contains the 2 input nibles    #
#                                                                      #
#     Routines Called:                                                 #
#            None                                                      #
#                                                                      #
########################################################################
SHORTINT nible1, nible2
integer temp

# first move the nible to an integer to prevent the sign bit to interfere,
# then shift the first nible left 4 bits to the left half of a byte,
# and then add the second nible to the integer and return the right byte
# of the temporary integer

temp = nible1
pck4b = temp*16 + nible2

return
end
E 1
