#ELF
#	pull @ $argc
#	pull @ $programname
#	-test 1 with @ $argc
#		when	zero			help
#	pull SI
L hexin
	= 8 to C
	zero B
L hexin_per_byte
        = @ SI to A
        maskbyte  A
	= $hexnybble + A to A
	flag A
		when sign 			bail
	AND 0x0f to A
	upshift 4 to B
	OR A to B
	1+ SI
		when	C-1			hexin_per_byte
L bail
	return
#			Linux $exit

L hexnybble
ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff

ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
ab 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07      # 0-9
ab 0x08 0x09 0xff 0xff 0xff 0xff 0xff 0xff

ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff

ab 0xff 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0xff      # a-f
ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff

ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff

ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff

ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff

ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
ab 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff

#cell  argc 
#
#text helptext <<!
#demo of hexadecimal number string input, e.g.
#	#
#	add  33ff33 22ffff 33 876
#!
#
#L help
 #       print $helptext
  #                      Linux $exit


#cell  programname
#
#hexin   		 a hex-string-to-cell subroutine labeled hexin
#
# Source this into the program file and then
#
#        call hexin
#                        within the program as appropriate. Pass this the
# leftmost character of the hex string in SI. The conversion stops at 8
# characters, or the first non-hexadecimal character byte. There is no 
# provision for signedness. The resulting cell value is left in B.

