AcornSearch - Acorn and RISC OS information searching
RISC OS Search
containing
"Nutty quip goes here!"
Home  |  About  |  Filebase Archive  |  StrongHelp Manuals  |  Newsgroups  |  Module Database
=>     R0 =      Foreground colour to use for control characters (0-&1F) or
             set to -1 if you do not wish ctrl chars to be specially treated.
     R1 =     redraw block (r_for, r_bac)
     R2 =     Pointer to text input string (length in R5)
     R3 =     Pointer to foreground mask (length in R5)
     R4 =     Pointer to background mask (length in R5)
     R5 =     Length of inputs in bytes
     R6 =     Destination buffer (length must be at least 6*R5+16 to ensure
             it is big enough - colour change + 0 -> 0,0 + terminator).
     R7 =     Substyle mask (if b3 of r_flags is set)

<=     R0 =     highest used character code used (ie &20-&FF)
     R5 =     length of output string (including 0,2 terminator)
     Only a subset of the the redraw codes available are used.

This SWI is to help prepare the r_data field of the redraw block. It takes
as input the pointer to a line of text character (0 - 255) to be treated as
ordinary characters (0 is not a control code). It also takes as input a
pointer to a background mask and a foreground mask list, giving the
background and foreground colours of each character separately. The output is
a line of the format required by r_data with control codes changing the
colours and specifying the line end. Control codes in the input string can
have their colour set automatically by setting R0 to the colour. See this example.

Note: Bit 3 of the substyle mask data is used to control the
'inverse video' style, ie. foreground and background colours are reversed in
the output data.

Example
Input:
Text input (characters):     "HELLO WORLD         "
Foreground (bytes list):      11111122222222222222 
Background (bytes list):      00000000000000000000 
Font masks (bytes list):      00000111111111111111 
Start background 0
Start foreground 1
Input length 20

Output:
"HELLO",0,9,1," ",0,1,2,0,"WORLD",0,2
(highest letter used = "W").

[sh-index] Back to list of manuals