More or less something like this: (unoptimized for clarity)
"Text"->Pointer
NPC(Pointer)
...
Lbl NPC
48->B
2->A
Rect(0,46,96,18)
RectI(1,47,94,16)
For(E,0,length(r1)
Text(A,B,{r1+E}>Char
A+4->A
If A>90
0->A
!If B-54
Repeat getKey
End
Rect(same numbers)
48->B
Else
54->B
End
End
DispGraph
End