DataMuseum.dk

Presents historical artifacts from the history of:

CP/M

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

See our Wiki for more about CP/M

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦31d94ad0d⟧ TextFile

    Length: 1664 (0x680)
    Types: TextFile
    Names: »READ.ME«

Derivation

└─⟦49cd49952⟧ Bits:30009431 50004848
    └─⟦0c326962c⟧ 
        └─⟦this⟧ »READ.ME« 

TextFile

Additional sample programs.
--------------------------

This disc includes three source (.PAS) files containing sample
Pascal programs not listed in the manual.


1. EASTER.PAS

As supplied, this program calculates and prints the date of Easter
for the years 1976 to 2000.  The procedure "dateofeaster" contains
the algorithm for the calculation, and the main program calls it
and displays the result.  The range of dates is determined by the
constants fyr and lyr at the head of the program.


2. PRIMES.PAS

This program derives the prime numbers in a given range using the
"sieve of Eratosthenes".  The statement in line 41 which displays
the prime values has been commented out (by placing comment
brackets æ å around it) to allow timing of the calculation.
Remove the comment brackets and recompile if desired.


3. LIFE.PAS

A program to play the "game of life".  There are two points to
note.
  (1). It contains a reference to the function RAND, which is in
the standard library but has to be declared before use (see 
section 9.3 in Part II of the manual).  As a consequence, the
compilation does not continue automatically into the link phase,
and the latter must be invoked separately by e.g.
       PROLINK B:LIFE,PASLIB/S
  (2). More significantly, the program makes use of direct screen
addressing for the display.  As coded, the operations are for
the Lear Siegler ADM 3A, and the procedures "print" at line 49
and "clearscreen" at line 59 may have to be amended for other
devices.

«eof»