PROGRAM testcpm;

var  Address     : byte;
     CPM2        : integer absolute $BE9B;
     CPMPlus     : integer absolute $FC5A;

Procedure Pause;
BEGIN
 if (address=$22) then
  Inline($CD/CPM2    /$18/$BB)
 else
  Inline($CD/CPMPlus /$18/$BB);
END;

begin
 clrscr;
 Write('CP/M Version:= ');
 writeln(Bdos(12));

 IF (BDOS($0C)=34) Then
     Address:=$22
  ELSE
     Address:=$31;

 write('Address:= ');
 writeln(Address);
 Pause;
end.