| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- MODULE first;
- FROM Sounds IMPORT Sound, NoSound;
- FROM Delay IMPORT Delay;
- FROM TTextIO
- IMPORT ReadInt, ReadCard, ReadChar, ReadString, ReadLn, ReadBuffer,
- WriteInt, WriteCard, WriteChar, WriteString, WriteBool, WriteLn,
- Eoln, SeekEof, SeekEoln;
- FROM TKernelIO
- IMPORT File, FileType, OptionMode,
- StatusProc, ReadProc, WriteProc, ErrorProc,
- stdinout, input, output, con, trm, kbd, lst, aux, usr,
- conStPtr, conInPtr, auxInPtr, usrInPtr, conOutPtr, lstOutPtr,
- auxOutPtr, usrOutPtr, errorPtr, IOresult, KeyPressed, IOBuffer,
- IOCheck, DeviceCheck, CtrlC, InputFileBuffer, OutputFileBuffer;
- (* Program to demonstrate simple constant translation *)
- CONST
- Version = 1;
- SubVersion = 0;
- Product = 'Turbo Translator';
- Bell = 7C; (* Bell hex code *)
- PROCEDURE Siren;
- VAR
- Frequency: INTEGER;
- BEGIN
- FOR Frequency := 500 TO 2000 DO
- Delay(1);
- Sound(Frequency);
- END;
- FOR Frequency := 2000 TO 500 BY -1 DO
- Delay(1);
- Sound(Frequency);
- END;
- NoSound;
- END Siren;
- BEGIN
- WriteLn(stdinout);
- WriteLn(stdinout);
- WriteString(stdinout, 'Welcome to ', 0);
- WriteString(stdinout, Product, 0);
- WriteString(stdinout, ' version ', 0);
- WriteInt(stdinout, Version, 0);
- WriteChar(stdinout, '.', 0);
- WriteInt(stdinout, SubVersion, 0);
- WriteLn(stdinout);
- WriteString(stdinout, Bell, 0);
- WriteString(stdinout, Bell, 0);
- WriteString(stdinout, Bell, 0);
- WriteString(stdinout, Bell, 0);
- WriteLn(stdinout);
- WriteString(stdinout, "The Programmers' time saver", 0);
- WriteLn(stdinout);
- Siren;
- END first.
|