Hi,
I am releasing this app under public domain. What it does is quite simple: it
saves the contents of the screen into a file c:\screen.txt, once every 3
seconds.
I am releasing this code to public domain since:
- GPL is too restrictive, and it is many times problematic for incorporating
into commercial products.
- I am having some problems, and I feel that if more people are exposed to the
code, they will be able to fix it, or tell me what I am doing wrong.
Problems:
the app displays a char on the right upper corner of the screen, which
indicates that is it working.
I start the app, and in commmand.com it works. I type some commands (like dir
of something similar) and I can see the commands output on the text file.
However when I start prorams like "turbo pascal" or "edit" or "dos navigator"
I still get the old command prompt on the text file. The funny thing is that
I see in the right upper corner my app runnning.
All the screen handeling was done by reading or writing from segment B800. In
TP code it looks like this:
Type
VGA_Screen = array[0..25-1,0..80-1] of record letter: char; color: byte;
end;
Var
Screen: VGA_Screen absolute $B800:0000;
The I just read or write to this variable to read or write to the screen. If
anyone has a better approach, please do tell.
I also need to implement "virtual keyboard input" from a text file. I found
function 5 of int 16h which can help me, however some tests I have run did
not work:
procedure send_key( ascii: char; scan_code: byte );
Begin
asm
mov ah, 05h
mov ah, scan_code
mov cl, ascii
int 16h
end;
End;
I send some chars to this function and then I did a readln. I expected to get
the letters sent to this function and the ones I actually typed on the KB in
the string. However I got only the ones I typed in the keyboard.
The app can be find in:
http://cucomania.homelinux.net/pub/dos/scrsave.pas
http://cucomania.homelinux.net/pub/dos/scrsave.exe
I compiled under TP 7.01 (the one from the french borland site they gace away
some years ago). I can port it to C, and probably will in the future.
--
diego, kde-il translation team
Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
Free MS-Office replacement for most platforms
http://www.openoffice.org/
-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
Freedos-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-devel