If you only want basic screen dump support, then invoke the BIOS print screen
routine which will do it all for you, INT 5h (or ask the user to press the
PrintScn key :).
--
!------- p...@mround.bt.co.uk -------! GAT d?(d) H s:-- g?>+++ p?>! au--- a- w+
!Phil "Phlash" Ashby!+44-1473-642735! v*>! C++$ L+>+++ 3+ ULHS+++(++++)$ P- E-
!MLB G/35,BT Labs,Martlesham,England! N++ K- W++ M V->! -po+ Y+ t-@ 5+ !j R G?
!- http://www.mround.bt.co.uk/~paa -! tv>! b+ D+ B? e-- u+(-) h---- f* r+++ y*
---Will
+----------------------------------------------------------------------+
| William White ŽŻ Yakima, WA. ŽŻ Hi-Country Foods Corporation |
| Quality Assurance Lab Technician ŽŻ Computer Analyst/Programmer |
| ** We make it, you drink it, you love it ** |
|Check out our new web page at http://www.wolfe.net/~hcfoods/index.html|
| For my Public PGP key, please finger me at w...@wolfe.net |
+----------------------------------------------------------------------+
Seem> | Quality Assurance Lab Technician ŽŻ Computer Analyst/Programmer |
> | ** We make it, you drink it, you love it ** |
> |CSheck out our new web page at http://www.wolfe.net/~hcfoods/index.html|
> | For my Public PGP key, please finger me at w...@wolfe.net |
> +--Ss--------------------------------------------------------------------+
> s
s
Seems like I recall int 5 can be used for this. Sorry for the
way the reply looks, your message gave my newsreader fits.
David
Easiest way I've done it is to open the printer as a file, PRN.
Then just write to the printer like you would a file.
--
===== zar...@bradley.edu ===== http://rhf.bradley.edu/~zarkon/ =====
Recursive: adj. see Recursive
So
char far *screen;
int i;
screen=MK_FP(0xb800,0);
for (i=0; i < (80*25); i++, screen+=2)
print_char(*screen);
print_char() is some function to print a char, put in new lines at the right
time etc...
The AnArChIsT - Anarchy! NOT Chaos! aka Alec Russell
ale...@icebox.iceonline.com
WWłFrom: w...@wolfe.net (William White)
WWłSubject: Printing contents of screen in C?
WWł
WWł Could someone please tell me how I would go about sending
WWłthe contents of the screen to the printer?
Assuming you are in ordinary text mode, video memory is likely to
start in
{
char far *ptr;
ptr = (char far *) 0xb8000000L ; ... }
Each character will be followed by its attribute byte, so you will
have to ptr += 2 after moving *ptr to its position in a print
buffer. HTH
---
ţ SPEED 1.40 #1672 ţ "Gullible" isn't in the dictionary. Oh, really?