Screen control functions



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;
}

.



Relevant Pages

  • Re: Cannot access class
    ... >> What IDE are you using? ... >> from the command line? ... > I am editing and compiling my program using Editplus 2.11 ... Notepad and DOS. ...
    (comp.lang.java.help)
  • Re: What would it take to port Mozilla to DOS?
    ... What they usually want is some OpenSource programs compiled for DOS. ... you think you see anything non-DOS if you were compiling and running Linux ... Win32 YAPL (Yet Another POSIX Layer) ...
    (comp.os.msdos.programmer)
  • Re: Database for DOS C program
    ... Wolfgang Mahringer wrote: ... program and it runs in a DOS like environment. ... I'm compiling it ... am using it for years now, under various OSs, including pure DOS. ...
    (comp.lang.c)
  • Re: Database for DOS C program
    ... program and it runs in a DOS like environment. ... I'm compiling it in ... wolfgang (dot) mahringer sbg at ...
    (comp.lang.c)
  • Re: ASM for Pocket PC?
    ... It's a 640k CGA mono computer that runs about 40 hours on ... It runs nearly all Dos software. ... I've used half a dozen assemblers, a number of Forths, Turbo C 2, Turbo c++ ... C++ gets kind of slow compiling but not too ...
    (alt.lang.asm)