O
OziRus
Hi,
This is my first message on this group. I want to ask something about
screen-drawing functions. I wrote and compiled below code succesfully
on TC IDE in Win-xp. Then i tried to work it on dos but it didn't work.
It runs but doesn't draw anything on screen. Could you say my fault? I
know far,dev and near are a bit problematic in xp but i think compiling
with Tc and running in dos might run it? [I didn't try it on linux yet]
Thanks for everything...
#include <stdio.h>
#include <conio.h>
char far *vp=(char far *)0xB0000000;
void _write(int row,int col,int ch)
{
char far *scrp=vp;
scrp+=row*160+col*2;
*scrp=ch;
}
int main()
{
_write(10,10,'t');
_write(10,11,'e');
_write(10,12,'s');
_write(10,13,'t');
return 0;
}
This is my first message on this group. I want to ask something about
screen-drawing functions. I wrote and compiled below code succesfully
on TC IDE in Win-xp. Then i tried to work it on dos but it didn't work.
It runs but doesn't draw anything on screen. Could you say my fault? I
know far,dev and near are a bit problematic in xp but i think compiling
with Tc and running in dos might run it? [I didn't try it on linux yet]
Thanks for everything...
#include <stdio.h>
#include <conio.h>
char far *vp=(char far *)0xB0000000;
void _write(int row,int col,int ch)
{
char far *scrp=vp;
scrp+=row*160+col*2;
*scrp=ch;
}
int main()
{
_write(10,10,'t');
_write(10,11,'e');
_write(10,12,'s');
_write(10,13,'t');
return 0;
}