.ROUTINE
mapdata->GDB1
"0123456789ABCDEF"->Str1
"Str1"->Str2
0->C->D
For(G,0,23) .23 is the size of the map minus one.
If {GDB1+G}->A={GDB1+G+1} and (C!=14) . "!=" is the does not equal sign
C+1->C
Else
{Str1+C+1}->{L1+D}
{Str1+A}->{L1+D+1}
D+2->D
0->C
End
End
GetCalc(Str2,C)->M
Copy(L1,M,C)
Return
But when there's more than 16 of any character it screws up. I think this could be solved, for instance, if there were 20 zeros just make it F040 or something.