Despite the fact that I believe that the use of "set display mode" in the middle of the program is wrong (for several reasons),
I don't have problems with it.
This part runs okay:
do
delete effect 1
set vertex shader off 1
set pixel shader off 1
delete image SteelTex
delete image SteelTexN
delete object 1
set display mode 800,600,32,1
load effect "media\reliefmapping.fx",1,0
make object box 1,500,1,500
position object 1,0,-45,0
load image "media\floor.dds", SteelTex
load image "media\floor_n.dds", SteelTexN
texture object 1, 0, SteelTex
texture object 1, 1, SteelTexN
texture object 1, 2, SteelTex
scale object texture 1,5,5
set object effect 1, 1
inc rst
text 0,0,str$(screen fps())
text 0,20, "resets done: "+str$(rst)
sync
sync
loop