DataMuseum.dk

Presents historical artifacts from the history of:

CR80 Hard and Floppy Disks

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about CR80 Hard and Floppy Disks

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦8a5eb04d2⟧ TextFile

    Length: 884 (0x374)
    Types: TextFile
    Names: »IN_OUT«

Derivation

└─⟦b8af24a88⟧ Bits:30005796 CR80 Disc Pack ( MINICAMPS )
    └─ ⟦this⟧ »OJG.D!IN_OUT« 

TextFile

%NOSUMMARY
%NOLIST
$@**GENS.D*PREFIX
%LIST
%EXECLEVEL = 2



CONST
    FORMAT = #0720;

VAR
    IS,OS : STREAM;
    CC    : COMPLETION_CODE;
    X,Y,Z : INTEGER;
    CH    : CHAR;


BEGIN
  CONNECT (PARAM.IFILE, INPUT_MODE, IS, CC);
  IF CC <> IO_OK THEN TERMINATE(CC);

  CONNECT (PARAM.OFILE, OUTPUT_MODE, OS,CC);
  IF CC <> IO_OK THEN TERMINATE(CC);

  OUTTEXT(OS,' THIS ROUTINE WILL GIVE THE SUM OF TWO NUMBERS(:0:)',CC);
  OUTTEXT(OS,'(:10:) TYPE IN THE FIRST NUMBER(:10:) X = (:0:)',CC);
  FLUSH (OS,CC);

  ININTEGER (IS,X,CC);
  INBYTE    (IS,CH,CC);

  OUTTEXT   (OS,'(:10:) TYPE IN THE SECOND NUMBER(:10:) Y = (:0:)',CC);
  FLUSH     (OS,CC);

  ININTEGER (IS,Y,CC);
  INBYTE    (IS,CH,CC);

  Z:= X + Y;

  OUTTEXT (OS,' THE SUM IS = (:0:)',CC);
  OUTINTEGER  (OS,Z,FORMAT,CC);
  FLUSH  (OS,CC);

  DISCONNECT (IS,PARAM.IFILE, CC);
  DISCONNECT (IS,PARAM.OFILE, CC);
END. «a5»