Mail Archives: djgpp/1996/04/11/12:37:18
Xref: | news2.mv.net comp.os.msdos.djgpp:2614
|
From: | jason AT PROBLEM_WITH_INEWS_DOMAIN_FILE (Jason Singer)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | _my_ds Help!
|
Date: | 11 Apr 1996 01:16:35 GMT
|
Organization: | I need to put my ORGANIZATION here.
|
Lines: | 45
|
Message-ID: | <4khmhj$3bl@mozo.cc.purdue.edu>
|
NNTP-Posting-Host: | hillres57.cc.purdue.edu
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
For the function of 'movedata', it gives the example of:
short blank_row_buf[ScreenCols()];
/* scroll screen */
movedata(_dos_ds, 0xb8000 + ScreenCols()*2,
_dos_ds, 0xb8000,
ScreenCols() * (ScreenRows()-1) * 2);
/* fill last row */
movedata(_my_ds, (int)blank_row_buf,
_dos_ds, 0xb8000 + ScreenCols()*(ScreenRows()-1)*2,
ScreenCols() * 2);
It gives a warning on '_my_ds'.
What is the problem?
What I really want to do is copy a 64000 byte buffer
to the screen (0xA000 or 0xA0000 in protected mode).
So, can't I just do:
main()
{
unsigned char *buffer;
buffer = (unsigned char *) malloc (64000);
/* Sets the whole screen to purple */
memset(buffer, 5, 64000);
/* This is my own function that sets the video mode to 13h */
set_mode(0x13);
movedata(_my_ds, (unsigned char *) buffer, _dos_ds, 0xA0000, 64000);
getch();
set_mode(0x03);
free(buffer);
}
So, please tell me all the errors that I have made and
what all includes do I need? Thanks!
Jason
- Raw text -