I assume it would be done like this, though i haven't tested it.
"0123456789ABCDEF"->Str1
GetCalc("prgmASM")->P .P is a pointer to the start of the data of the program ASM
GetCalc("Str1",{P-2}^r*2)->S .S is a pointer to the start of the data of OS var Str1
For(Z,0,{P-2}^r-1
{{P+Z}->A/16+Str1}->{Z*2+S}
{A^16+Str1}->{Z*2+1+S}
End
know that i'm not 100% sure this will work.. it should probably be tested on an emulator first. i tested it on a few basic programs though, which came with seemingly correct results. with a basic program having only 01234 as its first line, my program gave me the string 3031323334, which are the ASCII character codes of 0-4.
edit: this didn't work for an asm program i had. it might be better just to give the asm program an axe header, use axe's back-up feature to make an appvar of the program. then you have it in an appvar for your use.