Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2002-01

FreePascal, Go32 and inDOS-flag

2 messages · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Aitor Santamaria Merino

Hi,

This is a question, but also a comment, that I hope could help many people.

I am trying to write a program to write a screehshot capture program, working as a TSR activated with certain combination (AltGr+F8). In order to avoid problems with 16/32 bit when doing a TSR, I have made it under TurboPascal.

Just in case you believe I am having that problem, I use the BIOS variable ABSOLUTE $0040:$004E to determine the pageoffset from segment $b800 to determine where the characters should be. It outputs a BMP file.

Well, the program works well, I have tried shooting plain COMMAND.COM and TurboC, and works fine.
However, I haven't been able to shoot any freepascal application. I'll explain what I see: I did this testing program (to create TEST.BMP file). My fisrt testing was WITHOUT exec, I executed the program, then this test program.
My second testing was EXECuting internally.
I did another testing replacing delay(5000) by readln;readln;

=====
uses crt, dos;
begin
         exec ('VGASHOT.EXE','TEST');
         writeln ('inside');
         delay (5000);
         clrscr;
         writeLn ('final');
end.
======

In ALL the cases, the result was always THE SAME:
I could capture the 'final' word, but was NEVER able to capture the 'inside' word.

But, see how curious, I have realised that my TSR program does not make use of DOS calls (other than SetIntVect,Keep, etc, performed only at install/uninstall).

So my question is: does any FreePascal program capture the inDOS flag forever until the program exits??

Aitor

Reply by email

Aitor Santamaria Merino
to Aitor Santamaria Merino

Sorry!! I wrote my message in a run. Some punctualizations...

I am trying to write a program to write a screehshot capture program, working as a TSR activated with certain combination (AltGr+F8). In order to avoid problems with 16/32 bit when doing a TSR, I have made it under TurboPascal.

A TEXT MODE capture programs, sensible to codepages.

Show quoted text 7 lines
In ALL the cases, the result was always THE SAME: I could capture the 'final' word, but was NEVER able to capture the 'inside' word. But, see how curious, I have realised that my TSR program does not make use of DOS calls (other than SetIntVect,Keep, etc, performed only at install/uninstall).

THEREFORE, I removed all the InDOS-related code (and int 28h scheduler, etc), and the program WORKED, now I can shoot FPK applications as well.

By the way, I am planning to release the program under GNU-GPL, it's not too efficient, too restrictive (only VGA), not too fast, but it took "only" some hours of my time, and works, that's what I needed. If someone is interested, do let me know...

Aitor

Reply by email