kikass said:
yeah....^^ahref is right.... i forgot to mention... this program when executed will run as long as you dont press a key.... (loop is while(!kbhit())
and from the ranges you can see that only the alphabets are affected..
There is a HUGH HUGH difference between a TSR and while(!kbhit())
TSR = Terminate and Stay Resident. Your application is not a TSR! As soon as a key is hit, it will come to and end! TSR are different. Search at Wikipedia for more.
Well, I have forgotten my C theory and completely lost touch
but as far as I remember, far pointers are used because of following.
Pointers are 4 bytes - so max number of memory locations they can access is 65536 i.e. 64K. But memories are much larger. So memory is divided into segments of 64K each. Now when you need to access memory beyond a current block, you need to use a far pointer!
For example, when you declare a normal pointer, it may be within the current block where the application is working, so a normal pointer is alright. But if you need to access specific positions in memory like the starting point of video memory or status of caps/num/ins/scroll locks, then you need to use a far pointer because they are located beyond the current block of memory.
I may be technically wrong somewhere in this explanation
BTW, if you need to have some functions like savescreen(), restorescreen(), etc. in C, you can download them all or know more about them from here
I had made some 50 general purpose functions that were damn useful to me and many others. But they are old and can be used only in C under DOS
But at least they have some academic use.