Board index » delphi » Please help with PASCAL TSR!

Please help with PASCAL TSR!

Hello,

Currently, I am writing a program that should solve the
year-2000-problem...in Pascal (it's going to be free, I swear). in
this program I want to include some sort of a BIOS fixup routine that
corrects the BIOS by intercepting the int 15h. But my PASCAL program
occupies 24K in memory! So what I wanted to do is:

 - allocate memory for handler (written in ASM)
 - free program memory
 - exit program

With this procedure, the program would only occupy about 100 bytes.
But this does not seem to work! Any ideas?

Thanks in advance

Wouter

PS: I'll let you all now when it's finished!

 

Re:Please help with PASCAL TSR!


Quote
In article <64n2ri$ss...@server1.adam.ixe.net>, wot...@dds.nl wrote:
>Currently, I am writing a program that should solve the
>year-2000-problem... [...] But my PASCAL program occupies 24K in memory!
>[...]
>With this procedure, the program would only occupy about 100 bytes.

The default setting for a pascal program is 16K stack. You can try to lower
the stack settings with $M. Interrupt procedures use the caller's stack, then
your program's stack is needed until it goes to TSR. To do this a 2K stack is
enough!

BTW: why don't you code it in asm? (TASM)

BandiT

Re:Please help with PASCAL TSR!


Quote
Wouter Coene wrote:

> Hello,

> Currently, I am writing a program that should solve the
> year-2000-problem...in Pascal (it's going to be free, I swear). in
> this program I want to include some sort of a BIOS fixup routine that
> corrects the BIOS by intercepting the int 15h. But my PASCAL program
> occupies 24K in memory! So what I wanted to do is:

>  - allocate memory for handler (written in ASM)
>  - free program memory
>  - exit program

> With this procedure, the program would only occupy about 100 bytes.
> But this does not seem to work! Any ideas?

Well, as i understand it, the biggest problem isn't the bios, but
the fact that many programs only use 2 digit YEAR fields.

anyway, if you'd still like to know how to use a tsr, i got a small
example on my page:

home.sol.no/~bheid/prog/

cheers
- Asbj?rn

Other Threads