Please enable JavaScript to view this site.

A-Shell Reference

xcall INCOM, name, packet, opcode, stpos, length, status

INCOM is a variation of COMMON, allowing you to read and write a packet of information in memory, generally for the purpose of passing information between programs run in sequence on one job.

Parameters

name (String ,10)

name.ext of module. Note that only the first six characters will be used.

packet  (Any type, 1 to 1024 bytes)

Packet to read or write. You must use the SBR=MSGSIZ:# setting in miame.ini to set the necessary maximum packet length if your packet variable will be longer than the default 150 bytes.

opcode  (Num)  [in]

0 to read, 1 to write

stpos (Num)  [in]

position of first byte in packet.

length (Num)  [in]

number of bytes to read or write

status  [out]

1 for success, otherwise 0

Comments

The old AMOS version of this routine used a memory module that was loaded into system or user memory. The A-Shell version, on the other hand, actually uses COMMON, which has been enhanced in A-Shell to support many variations, and thus there does not need to be an associated file on disk or even a memory module. The name parameter, however, is needed to identify the packet within COMMON, but any extension will be ignored.

The main differences between INCOM and COMMON are that INCOM allows you to read/write an arbitrary subset of the packet (rather than the whole packet) and that the INCOM read operation is always non-destructive (whereas COMMON’s read is normally destructive but can be overridden by the SBR=COMMONNDR setting in miame.ini).