COMPIL.EXE 1.1.347 (and embedded version) fixes a problem with use of overlays in MAP statements within functions and procedures. Note that when using overlays within a function or procedure, both variables must be local and have the same longevity (static versus automatic). For example:
Procedure test()
static map1 vs1,s,10
static map1 vs2,s,10,@vs1 ! ok (both local static variables)
map1 v1,s,10
map1 v2,s,10,@v1 ! ok (both local stack variables)
map1 v3,s,10,@vs1 ! not ok (mixing static, non-static)