Corresponding to the MX_USRLOD enhancement above, XCALL MIAMEX,MX_USRIO (MIAMEX 111) now allows you to read and write full or partial arrays. No new parameters are needed. The only change is that now, if the specified VAR is an array element, then the BYTES specified is trusted, even if it exceeds the size of the VAR parameter. (This is needed, because when an XCALL parameter is specified as array element, e.g. VAR(1), then the size seen by the XCALL is the size of the element, not the size of the entire array.) To transfer read 70 elements worth of data from the memory module loaded in the previous MX_USRLOD example, back into the ARRAY, you could use the following:
MAP1 ARRAY(75),S,25
xcall MIAMEX, MX_USRIO, STS, MIDX, 0, ARRAY(1), 0, 70*25
You could also copy from the ARRAY to the memory module in the same way, using opcode 1. The only difference between this and the MX_USRLOD operation above is that MX_USRLOD will create the module if it doesn't already exist.