home *** CD-ROM | disk | FTP | other *** search
- Program AccessData;
- { This program will demonstrate how to access data that has }
- { been converted to an OBJect file with the BINOBJ utility. }
- { All that is necessary to access data in an overlayed unit, }
- { is to first determine if the unit has been overlayed by the }
- { main program. If this is the case, then what resides at }
- { the address of the procedure is a JMP instruction to the }
- { location of the procedure within the overlay buffer. }
- { Therefore, all that is necessary is to create a pointer to }
- { where the data actually resides in the overlay buffer. All }
- { of this is handled in the DataAcc unit. }
-
- Uses
- Overlay, DataAcc; { Link in the Overlay And Data Units }
-
- {$O DataAcc} { Actually overlay the unit }
-
- Var
- W : Word; { Variable to retrieve from the data }
-
- Begin
- OvrInit( 'List8-13.ovr' ); { Initialize the Overlay Manager }
- For W := 100 DownTo 1 Do { Read data from end to front }
- Write( ReturnWord( W ), ' ' );{ Echo the data to screen }
- Readln; { Pause for screen viewing }
- End.
-