\documentclass{article}
\usepackage{listings}
\usepackage{xepersian}
\settextfont{Yas}
\begin{document}
\begin{latin}
\begin{lstlisting}[frame=shadowbox,rulesepcolor=\color{black},language=pascal]
for i:=maxint to 0 do
begin
{ do nothing }
end;
for i:=maxint to 0 do
begin
{ do nothing }
end;
for i:=maxint to 0 do
begin
{ do nothing }
end;
for i:=maxint to 0 do
begin
{ do nothing }
end;
for i:=maxint to 0 do
begin
{ do nothing }
end;
for i:=maxint to 0 do
begin
{ do nothing }
end;
for i:=maxint to 0 do
begin
{ do nothing }
end;
for i:=maxint to 0 do
begin
{ do nothing }
end;
for i:=maxint to 0 do
begin
{ do nothing }
end;
for i:=maxint to 0 do
begin
{ do nothing }
end;
for i:=maxint to 0 do
begin
{ do nothing }
end;
for i:=maxint to 0 do
begin
{ do nothing }
end;
for i:=maxint to 0 do
begin
{ do nothing }
end;
for i:=maxint to 0 do
begin
{ do nothing }
end;
\end{lstlisting}
\end{latin}
\end{document}