26 Jan 1993

The X model version of the Zortech 3.1 function msm_readcounters() 
blows up with a GP fault. As this function is used by the Zinc 
library the following changes need to made to your source file
msmouse.asm found in the SOURCE\DOS386 directory.


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Locate this section of code
 
func	msm_readcounters
	push	EBP
	mov	EBP,ESP
	_ifs	msm_inited e 0, R1
	mouse	11
	jmp	msm1

R1:	jmp	G1
c_endp	msm_readcounters


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Add the missing line as indicated

func    msm_readcounters
	push    EBP
	mov     EBP,ESP
	uses    <EBX,ECX,EDX>  		;Add this line 

	_ifs    msm_inited e 0, R1
	mouse   11
	jmp     msm1

R1:     jmp     G1
c_endp  msm_readcounters

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Locate this section of code

msm1:	mov	EBX,P[EBP]
	mov	[EBX],ECX
	mov	EBX,P+SIZEPTR[EBP]
	mov	[EBX],EDX
	unuse	<EDX,ECX,EBX>
	pop	EBP
	ret
c_endp	msm_getstatus

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Add the missing lines as indicated

msm1:   mov     EBX,P[EBP]
	movsx   ECX, CX			;Add this line
	mov     [EBX], ECX
	mov     EBX,P+SIZEPTR[EBP]
	movsx   EDX, DX			;Add this line
	mov     [EBX],EDX
	unuse   <EDX,ECX,EBX>
	pop     EBP
	ret
c_endp  msm_getstatus

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;No more changes!

When these changes have been made you can reassemble using
masm. ztc will call masm with the correct flags. Use the
following syntax.

        ztc -c -mx msmouse
        
For customers without masm a suitable .obj is enclosed
that you can add to the blink command line, or replace in your Zortech
zps.lib as deemed appropriate.


EOF
