This part is the main problem:
For(r5,0,2
Fix 3
For(r2,0,min(7,L-S-1))
If r5=0
{r2+S+GDB1}>Hex->r3
ElseIf r5=1
{r2+S+GDB2}>Hex->r3
Else
{r2+S+GDB3}>Hex->r3
End
I don't want to repeat it every loop. I tried this, but it didnt work:
Lbl SCROL
S+r1-1->S
If S>L
L-1->S
End
If S=L
0->S
End
RecallPic
Text(20,0,"SQ
Text(30,0,"SQ
Text(40,0,"SQ
For(r5,0,min(7,L-S-1)
Text(0,r5*6+20,S+r5->r2>Hex
End
For(r5,0,2
If r5=0
{GDB1}->r4
ElseIf r5=1
{GDB2}->r4
Else
{GDB3}->r4
End
Fix 3
For(r2,0,min(7,L-S-1))
{r4+r2+S}>Hex->r3
Text(r5*10+20,r2*6+10,{r3+2}>Char
Text {r3+3}>Char
Fix 2
End
End
DispgraphClrDraw