home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / TP_ADV.ZIP / LIST0813.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1989-07-31  |  1.1 KB  |  28 lines

  1. Program AccessData;
  2. { This program will demonstrate how to access data that has   }
  3. { been converted to an OBJect file with the BINOBJ utility.   }
  4. { All that is necessary to access data in an overlayed unit,  }
  5. { is to first determine if the unit has been overlayed by the }
  6. { main program.  If this is the case, then what resides at    }
  7. { the address of the procedure is a JMP instruction to the    }
  8. { location of the procedure within the overlay buffer.        }
  9. { Therefore, all that is necessary is to create a pointer to  }
  10. { where the data actually resides in the overlay buffer.  All }
  11. { of this is handled in the DataAcc unit.                     }
  12.  
  13. Uses
  14.   Overlay, DataAcc;  { Link in the Overlay And Data Units     }
  15.  
  16. {$O DataAcc}         { Actually overlay the unit              }
  17.  
  18. Var
  19.   W : Word;          { Variable to retrieve from the data     }
  20.  
  21. Begin
  22.   OvrInit( 'List8-13.ovr' ); { Initialize the Overlay Manager }
  23.   For W := 100 DownTo 1 Do   { Read data from end to front    }
  24.     Write( ReturnWord( W ), '   ' );{ Echo the data to screen }
  25.   Readln;                    { Pause for screen viewing       }
  26. End.
  27.  
  28.