#!/bin/sh
xdigit='[[:xdigit:]]\{1,\}'
start_address=${1:-$xdigit}

# white space is tab-stop, not just spaces
tab='[^	]\{1,\}	'
space='[[:space:]]\{1,\}'
nospace='[^[:space:]]\{1,\}'

${TEVWH_PATH_SED} -n -e "/^ *${start_address}:/,$ p" \
| ${TEVWH_PATH_SED} \
	-e 's/ *	/	/g' \
	-e "s/${space}\(${TEVWH_ASM_COMMENT}\)/	\1/" \
	-e "s/^\(${tab}${tab}${nospace}\)${space}/\1	/" \
	-e "/^[[:space:]]*\.*[[:space:]]*$/q" \
	-e "/\<${TEVWH_ASM_RETURN}\>/q" \
| ${TEVWH_PATH_EXPAND} -t 12,32,40,60
