Overlay procedure adressing 
Author Message
 Overlay procedure adressing

Hi. I have got problems with defining procedure adresses when they are
loaded from an OVERLAY. The adress operator or the addr functions return an
adress but it does not point to the nesessary location. I have tried to use
the offset part, the functions mentioned above return, and the overlay
buffer address as the segment. But this technique does not give stable
results. If anyone knows how the overlay Pascal management works write me
back.



Wed, 18 Jun 1902 08:00:00 GMT  
 Overlay procedure adressing



Quote:
>Hi. I have got problems with defining procedure adresses when they are
>loaded from an OVERLAY. The adress operator or the addr functions return an
>adress but it does not point to the nesessary location.

This is true. The address operator if applied to an overlaid
function/procedure does not give litterally the address of the
procedure's code because this address is not known to the program even

        INT $3F, offset

which is a jump into the overlay manager's code who will redirect the
call to the correct location. A _call_ to the procedure will work

Example:

Quote:
>--x.pas-----------------<

{$O+}
unit x;
interface
procedure ox;
implementation
procedure ox;
begin writeln('hello') end;
end.

Quote:
>------------------------<
>---otest.pas------------<

uses overlay,x;
var
  p:pointer;
begin
  overinit('otest.ovr');

  asm
    call p
  end
end.

Quote:
>-------------------------<

Even an indirect call via BASM will work as expected.

Can you give a short example which doesn't work as you would expect ?

Regards
Horst

 *** Las orillas del Nahuel Huapi ***



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Absolute adressing

2. Indirect adressing and ^

3. Indirect adressing and ^

4. Req: Memory adressing in Pmode

5. Reading/adressing the value of individual pins of my printerport in Pascal

6. Adressing more than 64K in one contigious piece.

7. adressing the com-port

8. over-110.zip Optimized TP6/BP7 Overlay unit

9. over-101.zip Optimized TP6/BP7 Overlay unit

10. error 208 overlay manager

11. TP6, Overlay, Map files

12. Source of overlay unit available

 

 
Powered by phpBB® Forum Software