2 # Expand syntax sugar for SubX string literals and show the corresponding handle definition.
4 # The handle has a fake alloc-id; we're never going to try to reclaim global
5 # variables, we just sometimes need handles in them to satisfy type constraints.
8 echo " 0x11/imm32/alloc-id:fake:payload"
11 # print length in bytes
12 printf " 0x%x/imm32/size\n" $
(echo -n $INPUT |
wc -c)
14 # print ascii codes for each character in hex
16 for c
in $
(echo "$INPUT" |
sed -e 's/./& /g')
18 echo -n " 0x$(printf '%x' "'$c")/$c"