Category : Modula II Source Code
Archive   : TASKING.ZIP
Filename : GETPSP.DEF

 
Output of file : GETPSP.DEF contained in archive : TASKING.ZIP
DEFINITION MODULE GetPSP;

FROM SYSTEM IMPORT BYTE, ADDRESS;

EXPORT QUALIFIED PSP, FCB, PSPptr, ENVIRptr, getarg, getenv;

TYPE
FCB = RECORD
Drive: CHAR;
FileName1: CHAR;
FileName2: CHAR;
FileName3: CHAR;
FileName4: CHAR;
FileName5: CHAR;
FileName6: CHAR;
FileName7: CHAR;
FileName8: CHAR;
Extension1: CHAR;
Extension2: CHAR;
Extension3: CHAR;
CurrentBlock: CARDINAL;
RecordSize: CARDINAL;
END;

PSP = RECORD (* offset *)
INT20H: ARRAY [0 .. 1] OF BYTE; (* 00H *)
MemLimitSeg: CARDINAL; (* 02H *)
Reserved: BYTE; (* 04H *)
LongCall: BYTE; (* JUMP ADR(LongCall), not useful *) (* 05H *)
SegSize: CARDINAL; (* long call offset, not usefull *) (* 06H *)
LongCallSeg: CARDINAL; (* not usefull *) (* 08H *)
Terminate: ADDRESS; (* 0AH *)
CTRLcExit: ADDRESS; (* 0EH *)
HardErrorExit: ADDRESS; (* 12H *)
DOS1: ARRAY [0 .. 15H] OF BYTE; (* do not use *) (* 16H *)
EnvironmentSeg: CARDINAL; (* 2CH *)
DOS2: ARRAY [0 .. 2DH] OF BYTE; (* do not use *) (* 2EH *)
FCB1: FCB; (* 5CH *)
FCB2: FCB; (* 6CH *)
Filler: ARRAY [0 .. 3] OF BYTE; (* 7CH *)
commTail: ARRAY [0..127] OF CHAR; (* commTail[0] is size *) (* 80H *)
END;

VAR
PSPptr: POINTER TO PSP;

ENVIRptr: POINTER TO ARRAY [0 .. 7FFFH] OF CHAR;
(* initialized from EnvironmentSeg *)

TYPE
argno = [0 .. 63];

PROCEDURE getarg(argnum: argno; VAR arg: ARRAY OF CHAR);

PROCEDURE getenv(key: ARRAY OF CHAR; VAR val: ARRAY OF CHAR);

END GetPSP.


  3 Responses to “Category : Modula II Source Code
Archive   : TASKING.ZIP
Filename : GETPSP.DEF

  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/