home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / SHOWBIN.ZIP / SHOWBIN.PAS next >
Encoding:
Pascal/Delphi Source File  |  1988-12-01  |  2.1 KB  |  49 lines

  1. Program ShowBin;
  2.  
  3. Uses Crt;
  4.  
  5. {$L test.obj}
  6. {$L test2.obj}
  7. (***************************************************************************)
  8. (* Template for displaying TheDraw graphics screens saved as a .BIN file.  *)
  9. (***************************************************************************)
  10. (* First, the .BIN file created by TheDraw must be converted               *)
  11. (* to an .OBJ file by using Boralnd's BINOBJ program.                      *)
  12. (* You must assign a unique dummy public name to each .BIN                 *)
  13. (* file you are linking, and use the $L compiler directive to              *)
  14. (* link in each .OBJ file.  For example, I assigned the public             *)
  15. (* name "ShowBinaryFile" to test.bin when I converted it to an             *)
  16. (* .OBJ file by using the syntax "BINOBJ test.bin test.obj ShowBinaryFile" *)
  17. (* Then simply declare the public name as an external procedure, set up a  *)
  18. (* pointer, and call the Move procedure to display your screen.            *)
  19. (*                                                                         *)
  20. (* This program provided compliments of                                    *)
  21. (*                                    Brian Corll                          *)
  22. (*                                    102 West Locust Street               *)
  23. (*                                    Mechanicsburg, PA 17055              *)
  24. (*                                                                         *)
  25. (*                                    You can reach me by QwikMail         *)
  26. (*                                    on the Pascal conference.            *)
  27. (***************************************************************************)
  28.  
  29. Type
  30.    ScreenType = Array[0..3999] of Byte;
  31.  
  32. Var
  33.    Screen : ScreenType absolute $B800 : 0000;
  34.    BinPtr : ^ScreenType;
  35.  
  36.  
  37.     Procedure ShowBinaryFile;external;
  38.     Procedure ShowSecondFile;external;
  39.  
  40. begin
  41.      BinPtr := Ptr(CSeg,Ofs(ShowBinaryFile));
  42.      Move(BinPtr^,Screen,4000);
  43.      Delay(2000);
  44.      BinPtr := Ptr(CSeg,Ofs(ShowSecondFile));
  45.      Move(BinPtr^,Screen,4000);
  46. end.
  47.  
  48.  
  49.