h6. [[OS SWI Calls]] h6(. » OS_SetVarVal h2. OS_SetVarVal h5. (SWI &24) |_<^{width:4em}. Entry | | |<^. R0 |<^. Pointer to name | |<^. R1 |<^. Pointer to value to set to| |<^. R2 |<^. Length, or -1 to delete| |<^. R3 |<^. Name pointer (0 for 1[^st^] call)| |<^. R4 |<^. [[OS_ReadVarVal Variable Types|Variable type]]| |_<^{width:4em}. Exit | | |<^. R0 |<^. Preserved | |<^. R1 |<^. Preserved | |<^. R2 |<^. Preserved | |<^. R3 |<^. New name pointer | |<^. R4 |<^. [[OS_ReadVarVal Variable Types|Variable type]] | h4. Use The purpose of this call is to write a variable value. h4. Notes This SWI sets a variable's value to that specified, or deletes the variable. The name may be wildcarded for deletion and update (using '*' and '#'). Code variables will not be deleted unless R4 = 16. Literal strings do not need to be null terminated, as R2 is used for the length. [[OS_ReadVarVal]] is marked as being re-entrant, which would allow it to re-enter the same code variable's read code. No note is made about this in the PRM and the code variable example in the PRM calls [[OS_Byte 135]] which has undefined re-entrancy! h4. See also * [[OS_Byte 135]] * [[OS_ReadVarVal]] * [[OS_ReadVarVal Variable Types]]