Texture stops copying in Windows

I am copying a fragment of the texture to renderer in the loop . After some time, it stops copying. Windows 10. Below is the code in BasicC that is translated into C:
#include <BasicSDL.h>
int x,y;
SDL_TextureTP;
MAIN
DST(100,0,400,400)
SDLOpen(0)
LoadImg(TP,“Pliki/TP1.jpg”)
Do
Cls
SRC(x,y,400,400)
PutImgRect(TP,SRC,DST)
GetEvents
x=x+10
InKey(SDL_SCANCODE_P)-10InKey(SDL_SCANCODE_O);
y=y+10
InKey(SDL_SCANCODE_A)-10*InKey(SDL_SCANCODE_Q);
ShowPage
Print x _ y NL
Until(Quit)
ENDMAIN