dmt@hocsl.UUCP (06/19/84)
Two items of interest: a response to Fred Mendenhall on printing & keyboard readin in graphics mode, and how to implement ReverseVideo, BlinkVideo, etc. --- My graphics programs put my PC into graphics mode by the standard INT 10 BIOS call, function #6. This doesn't interfere with normal keyboard reads. Normal writes and writelns work too, but depend on the BIOS' forming characters out of pixels; in graphics mode, the display board won't generate characters. You shouldn't have to do anything special to make this happen. If the BIOS works right, TURBO uses it right. (I don't have the 8087 version; I ASSUME they didn't change this property, since it has nothing to do with floating point crunching.) However, DO REMEMBER to go back to alpha mode (INT10, function #2) when you exit. --- After a little work with debug, I found the magic location where TURBO PASCAL keeps the current video attribute. This is where LowVideo and HighVideo plant the attribute byte for WRITE to use. It is HEX 0145 in the version I have. Implication: you now have an easy way to write a procedure ReverseVideo, BlinkVideo, etc. Just make a pointer to (Cseg,$0145), and write the appropriate attribute byte there. In case other versions store it someplace else, here's how to find it. Write a test program that is only a string of LowVideos followed by a string of HighVideos. Compile it into a .COM file, then run DEBUG on the file. Loc 0100 will be a jump to the beginning of the program. (Find location by unassembling.) Unassembling at the beginning of the program, you will easily see the string of calls to LowVideo & HighVideo. Go to these routines, and unassemble. They get a byte from somewhere (141 and 142, in my version) and store it in the MAGIC location. Verify (using dump)that the bytes they get are 07 and 0F (the attributes for normal and high video), and you've found it. Happy hacking! Dave Tutelman