TERRA Datentechnik, Technical Support Sheet
=================================================================

TZ-920413.1/Bj
Logitech Modula-2 4.0
Standard Library

Subject: Typing error in "DosCalls.DosCall_03h" and 
                         "DosCalls.DosCall_56h"
---------------------------------------------------

The procedures "DosCalls.DosCall_03h" (Auxiliary Input) and
"DosCalls.DosCall_56h" (Change Directory Entry -> Rename) do
pass the wrong function number in register AH.
To correct the error simply edit the file as shown below, compile
it and place the object file in a directory which the environment
variables "M2OBJ" (for M2Make) and "OBJ" (for M2L) are pointing to. 

File: DOSCALLS.MOD lines 57-65
------------------------------
PROCEDURE DosCall_03h ['DosCall_03h'] ( VAR char : BYTE );
   VAR
	r : REGISTERS;
   BEGIN 
	r.AH := 01h; 	(* ***DOS: stdaux blocking interrubtable char input *)
	(*      ^- must be 03h *)
	INT(21h, r);
	char := r.AL;
   END DosCall_03h; 

File: DOSCALLS.MOD lines 1450-1472
----------------------------------
PROCEDURE DosCall_56h ['DosCall_56h'] ( StringFromAddr	: ADDRESS;
					StringToAddr	: ADDRESS;
					VAR ErrorCode 	: WORD );
   VAR
	r : REGISTERS;
   BEGIN 
   	r.DS := StringFromAddr.SEGMENT;	(* ASCIIZ path/filename *)
   	r.DX := StringFromAddr.OFFSET;
  	r.ES := StringToAddr.SEGMENT;	(* ASCIIZ path/filename *)
   	r.DI := StringToAddr.OFFSET;
   	r.AH := 4Eh; 	(* ***DOS:  Rename a Find *)
   	(*      ^- must be 56h *)
   	INT(21h, r);
	IF CF IN r.FLAGS THEN
	   ErrorCode := r.AX;	(* 02==fileNotFnd, 03==PathNotFnd,  	*)	
	ELSE			(* 05==AccDen, 11h==diffDev		*)
	   ErrorCode := 0h;
	END;
   END DosCall_56h;
                                   * * *