home *** CD-ROM | disk | FTP | other *** search
/ POINT Software Programming / PPROG1.ISO / pascal / swag / dos.swg / 0020_Dos IPCA.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1993-08-27  |  1.1 KB  |  49 lines

  1. {
  2. GUY MCLOUGHLIN
  3.  
  4.  Program to load data into 16 Byte area of RAM known as
  5.  the Dos "Inter-Process Communication Area".
  6. }
  7.  
  8. Program Load_Dos_IPCA;
  9.  
  10. Type
  11.   arby16 = Array[1..16] of Byte;
  12.  
  13. { "Absolute" Array Variable used to access the Dos IPCA. }
  14. Var
  15.   IPCA  : arby16 Absolute $0000:$04F0;
  16.   Index : Byte;
  17.  
  18. begin
  19. { Write data to the Dos IPCA. }
  20.   For Index := 1 to 16 do
  21.     IPCA[Index] := (100 + Index)
  22. end.
  23.  
  24. { Program to read data from 16 Byte area of RAM known  }
  25. { as the Dos "Inter-Process Communication Area". }
  26. Program Read_Dos_IPCA;
  27.  
  28. Type
  29.   arby16 = Array[1..16] of Byte;
  30.  
  31. { "Absolute" Array Variable used to access the Dos IPCA. }
  32. Var
  33.   IPCA  : arby16 Absolute $0000:$04F0;
  34.   Index : Byte;
  35.  
  36. begin
  37.   Writeln;
  38.   { Display the current data found in the Dos IPCA. }
  39.   For Index := 1 to 16 do
  40.     Write(IPCA[Index] : 4);
  41.   Writeln
  42. end.
  43.  
  44. {
  45.   NOTE:
  46.   if you plan on using this in any of your serious applications, I would
  47.   recommend using the last 2 Bytes of the IPCA as a CRC-16 error-check. As
  48.   you have no guarantee that another Program won't use the IPCA too.
  49. }