Category : Modula II Source Code
Archive   : M2TUTOR.ZIP
Filename : CH14E2.MOD

 
Output of file : CH14E2.MOD contained in archive : M2TUTOR.ZIP
(* Chapter 14 - Programming exercise 2 *)
MODULE CH14E2;

FROM InOut IMPORT WriteInt, WriteLn;
FROM SYSTEM IMPORT ADR, TSIZE, ADDRESS;

VAR BigList : ARRAY[1..100] OF CARDINAL;
Index : INTEGER;
Point : ADDRESS;

BEGIN

FOR Index := 1 TO 100 DO
BigList[Index] := 200 + Index;
END;

Point := ADR(BigList[100]);
FOR Index := 1 TO 8 DO
WriteInt(INTEGER(Point^),6);
WriteLn;
Point := Point - 12 * TSIZE(INTEGER);
END;

END CH14E2.




(* Result of execution

300
288
276
264
252
240
228
216

*)



  3 Responses to “Category : Modula II Source Code
Archive   : M2TUTOR.ZIP
Filename : CH14E2.MOD

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/