dos_compilers/Microsoft Pascal v1/PASKEY

67 lines
3.1 KiB
Plaintext
Raw Normal View History

2024-06-30 15:59:54 +02:00
{ DOS version of PASKEY (Pascal Pre-declaration) File}
INTEGER WORD CHAR REAL {primitive types}
634 {size in bytes of FCB without buffer variable}
{intrinsic pre-declared procedures and functions}
READLN WRITELN READ WRITE PAGE READFN READSET NEW DISPOSE
PACK UNPACK EVAL * * * *
EOF EOLN CHR ORD ABS SQR PRED SUCC ODD LOWER UPPER
HIBYTE LOBYTE WRD DECODE ENCODE SIZEOF RETYPE RESULT BYWORD
{intrinsic pre-declared constants and data types}
CONST MAXINT=32767; MAXWORD=65535; NULL=0;
TYPE BOOLEAN=(FALSE,TRUE); TEXT=FILE OF CHAR;
STRING =SUPER PACKED ARRAY [1..*] OF CHAR; SINT=-127..127;
LSTRING=SUPER PACKED ARRAY [0..*] OF CHAR; BYTE=WRD(0)..255;
ADRPQQQ=RECORD R:WORD END; ADSPQQQ=RECORD R:WORD; S:WORD END;
LSTLQQQ=RECORD LEN:BYTE END; ADAPQQQ=ARRAY [WRD(0)..32765] OF BYTE;
ADRMEM=ADR OF ADAPQQQ; ADSMEM=ADS OF ADAPQQQ;
END {terminate declaration section}
{runtime unit interface; as a unit, allows renaming entry points}
INTERFACE; UNIT RUNTQQQ
(FCBFQQ,INPFQQ,OUTFQQ,FILEMODES,SEQUENTIAL,TERMINAL,DIRECT,
SEKFQQ,RESFQQ,REWFQQ,ASSFQQ,CLOFQQ,CLDFQQ,GETFQQ,PUTFQQ,
SRTRQQ,SINRQQ,COSRQQ,ATNRQQ,EXPRQQ,LNERQQ,TRNRQQ,ROURQQ,FLTRQQ,
CONLQQ,DELLQQ,INSLQQ,CPLLQQ,POSLQQ,SEQLQQ,SNELQQ,CPSLQQ,
MOVEL,MOVER,FILLC,MOVESL,MOVESR,FILLSC,EMSEQQ);
TYPE FILEMODES = (SEQUENTIAL, TERMINAL, DIRECT);
FCBFQQ = RECORD TRAP:BOOLEAN; ERRS:BYTE; MODE:FILEMODES END;
VAR INPFQQ,OUTFQQ:TEXT;
PROCEDURE SEKFQQ (VAR F:FCBFQQ;N:WORD);
PROCEDURE RESFQQ (VAR F:FCBFQQ);
PROCEDURE REWFQQ (VAR F:FCBFQQ);
PROCEDURE ASSFQQ (VAR F:FCBFQQ;CONSTS N:STRING);
PROCEDURE CLOFQQ (VAR F:FCBFQQ);
PROCEDURE CLDFQQ (VAR F:FCBFQQ);
PROCEDURE GETFQQ (VAR F:FCBFQQ);
PROCEDURE PUTFQQ (VAR F:FCBFQQ);
FUNCTION SRTRQQ (A:REAL):REAL;
FUNCTION SINRQQ (A:REAL):REAL;
FUNCTION COSRQQ (A:REAL):REAL;
FUNCTION ATNRQQ (A:REAL):REAL;
FUNCTION EXPRQQ (A:REAL):REAL;
FUNCTION LNERQQ (A:REAL):REAL;
FUNCTION TRNRQQ (A:REAL):INTEGER;
FUNCTION ROURQQ (A:REAL):INTEGER;
FUNCTION FLTRQQ (A:INTEGER):REAL;
PROCEDURE CONLQQ (VARS D:LSTRING;CONSTS S:STRING);
PROCEDURE DELLQQ (VARS D:LSTRING;I,L:INTEGER);
PROCEDURE INSLQQ (CONSTS S:STRING;VARS D:LSTRING;I:INTEGER);
PROCEDURE CPLLQQ (CONSTS S:STRING;VARS D:LSTRING);
FUNCTION POSLQQ (CONSTS P,S:STRING;I:INTEGER):INTEGER;
FUNCTION SEQLQQ (L:INTEGER;C:CHAR;CONSTS S:STRING;I:INTEGER):INTEGER;
FUNCTION SNELQQ (L:INTEGER;C:CHAR;CONSTS S:STRING;I:INTEGER):INTEGER;
PROCEDURE CPSLQQ (CONSTS S:STRING;VARS D:STRING);
PROCEDURE MOVEL (S,D:ADRMEM;L:WORD);
PROCEDURE MOVER (S,D:ADRMEM;L:WORD);
PROCEDURE FILLC (D:ADRMEM;L:WORD;C:CHAR);
PROCEDURE MOVESL (S,D:ADSMEM;L:WORD);
PROCEDURE MOVESR (S,D:ADSMEM;L:WORD);
PROCEDURE FILLSC (D:ADSMEM;L:WORD;C:CHAR);
PROCEDURE EMSEQQ (CONST MS:LSTRING;EC,ES:WORD);
END; USES RUNTQQQ
(FCBFQQ,INPUT,OUTPUT,FILEMODES,SEQUENTIAL,TERMINAL,DIRECT,
SEEK,RESET,REWRITE,ASSIGN,CLOSE,DISCARD,GET,PUT,
SQRT,SIN,COS,ARCTAN,EXP,LN,TRUNC,ROUND,FLOAT,
CONCAT,DELETE,INSERT,COPYLST,POSITN,SCANEQ,SCANNE,COPYSTR,
MOVEL,MOVER,FILLC,MOVESL,MOVESR,FILLSC,ABORT); END.