#!/bin/rc
# extexec2hex [file...] - convert text & data segs of standalone 9 binary to
# C hex.  have to strip extended a.out header, which is 8 bytes bigger than
# on 32-bit systems.
xd -1x $* | sed -e 's/^[0-9a-f]+ //'				\
	     -e '1,2d' -e '3s/^ .. .. .. .. .. .. .. ..//'	\
	     -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
