sendcalc Function (ROM Call 0x55)

link.h

unsigned short sendcalc (SYM_STR SymName, short allowSysVars, unsigned short DevType, unsigned char *compat);

Sends a variable (or program) through the link interface.

sendcalc sends a variable (or program) through the link interface (this is exactly what the TI-Basic command SendCalc does). SymName is a pointer to the variable name. allowSysVars is a Boolean parameter. If it is TRUE, transfer of a system variable will be allowed, and if it is FALSE, such transfer will be rejected. DevType determines the device type (see LIO_Send for the explanation about its meaning). If Compat is not a NULL pointer, sendcalc also stores in a byte variable pointed to by compat compatibility information about the variable which will be transfered (see info about SYM_ENTRY structure in vat.h header file for more info about compatibility flags).

Note that SymName is not an ordinary C string. Instead, it is zero-started zero-terminated string, and SymName points to the terminating byte of it (many TIOS functions for manipulating with TIOS variables use such strings). See SYMSTR and other functions from the vat.h header file for more info about symbol names). For example, to send a variable called "example" from one TI-89 unit to another, use the following command:

sendcalc (SYMSTR ("example"), FALSE, 0x98, NULL);
Replace 0x98 with 0x89 to simulate TI-Basic SendChat command instead of SendCalc.

sendcalc returns zero if the operation was successful, else returns a non-zero value (this value describes the type of the error, but I am not sure about the concrete meaning of particular values). This function also may throw an error in a case of various fatal errors, so error trapping (using functions from the error.h header file) is recommended.


Uses: LIO_Send, push_indir_name, HToESI, top_estack, strcmp, convert_to_TI_92, ParseSymName, CheckLinkLockFlag, CheckSysFunc, DerefSym, GetDataType, SymSysVar, VarRecall
Used by: OSLinkCmd, cmd_sendcalc, cmd_sendchat


See also: getcalc, cmd_sendcalc, cmd_sendchat