[net.lang.pascal] Big troubles with interrupts in Microsoft Pascal

jmp@mult.UUCP (J.M Pigeon) (06/23/86)

*** MESSAGE FOLLOWING, PLEASE STAND BY ***

	I am not able to get this program working (HELP, HELP!!!)

	CONFIG	  :  PC-AT, MSDOS V3.20, Microsoft Pascal V3.31.

	SYMPTOMS  :  'cpt' always zero, MSDOS badly damaged, forced
		     to reboot.

	REASONS   : If the interrupt 28 occurs during DOS, or BIOS
		    time then DS register is set to 40H, (of course
		    this is not the right value), so a memory byte
		    (somewhere) is updated instead of 'cpt'.

	REQUESTS  : Unless the Microsoft interrupt procedure is
		    totaly USELESS, we MUST have a way to
		    set the proper DS value.
		    Could somebody, in Netland, give me a HINT ???
	
					   Thanks.

					   JMP.

PS:	The purpose of this short test, is to see if I can 
	build something around TIC interrupts.

address:	../philabs/micomvax/mult/jmp

(*----------------------CUT---------------------------------*)		

	program  tstint(input,output);

var	cpt	:  integer;

var 	str	:  string(05);
	j,k	:  integer;

procedure vectin(v:word;procedure i[interrupt]);
extern;

procedure cptint[interrupt];

begin
cpt:=succ(cpt);
end;

begin
vectin(28,cptint);
for j:=1 to 10 do
  begin
  readln(str);
  writeln('cpt:=',cpt:0,'  <',str,'>');
  end;
end.


(*---------------------------------------------------------------*)