Entry | |
---|---|
R0 | Pointer to 4-word data structure, or 0 for global messages |
R1 | Pointer to Token |
R2 | Pointer to buffer for result |
R3 | Size of buffer |
R4 | Pointer to parameter 0, or 0 if none |
R5 | Pointer to parameter 1, or 0 if none |
R6 | Pointer to parameter 2, or 0 if none |
R7 | Pointer to parameter 3, or 0 if none |
Exit | |
---|---|
R0 | Preserved |
R1 | Pointer to token-terminator |
R2 | Pointer to result string (read only with no substitution if R2 = 0 on entry) |
R3 | Size of result excluding terminator |
This SWI is used to translate a message token into a string, with optional parameter substitution.
If R2 = 0 on entry, you’ll get a pointer to a read-only string, and no parameter substitution will be done, also the string will be terminated by 10, and not 0.
If R2 != 0, %0 to %3 in the string will be replaced by the strings in R4 to R7. Prior to this call, you must have called MessageTrans_OpenFile.
If the token is not found in the message file specified, it will be searched for in the global message file.
If R2 = 0 on entry and the file is not stored in your own workspace, then the pointer will become invalid after Service_MessageFileClosed is issued – your application must trap this service call so it can re-read pointers.