About C programming-VDU memory

Is there something gone wrong in the below
program.Because when i execute this program i will get infinite output.Actually,I wrote this program for flipping the characters on the screen.I mean this program converts the small case letters into capital case letters & vice-versa infinite times present at a particular address so that the output appears as the characters flipping on the screen.But i didnt get this effect.Why?And on my pc windows-xp is installed & i use turbo c.
PROGRAM.
--------------------------
#include
#include
void main()
{
int i;
char far *s;
clrscr();

s=(char far *)0xB8000000;
while(1)
{
for(i=0;i<=3998;i+=2)
{
if(*(s+i)>='A' && *(s+i)<='Z')
*s=*s+32;
else
{
if(*(s+i)>='a' && *(s+i)<='z')
*s=*s-32;
}
}
}
}
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories