Please enable JavaScript to view this site.

A-Shell Development History

MIAMEX 108 now supports an additional parameter, (COUNT), making it easier to load full or partial arrays into a memory module:

xcall MIAMEX, MX_USRLOD, idx, fspec$ {,flags {,var {,count}}}

When FLAGS contains USRMEM_NOFILE (meaning that the module is to be loaded from contents of the variable VAR, with FSPEC$ indicating the desired name of the memory module), then if VAR is actually an array element, e.g. VAR(1), then COUNT can be specified to indicate the number of elements to load starting with the specified element. For example:

MAP1 ARRAY(75),S,25

XCALL MIAMEX,MX_USRLOD,MIDX,"MYMOD",USRMEM_NOFILE,ARRAY(1),70

 

The above would load 75 elements of the array, starting with ARRAY(1) into a memory module named "MYMOD", whose index number would be returned in MIDX.

Warning: It is impossible for the subroutine to know whether the COUNT value you specify is actually valid (i.e. not larger than the array), so the responsibility is yours.