unit GvCursor;

{ Graphics Vision Mouse Cursor Management, Copr. 1994 Matthias K”ppe
}

noch nicht fertig.

interface

function GetSystemCursor(n: Integer): pointer;

implementation

uses GenData;

var
  Cursors: PGenericData;
  SavedGetCursor: TMcProc;

function GetSystemCursor(n: Integer): pointer; assembler;
asm
	mov	bx, n
	les	si, Cursors
	mov	ax, si
	or	ax, es
	jz	@@0
	add	si, TGenericData.Data
	cld
@@1:	seges 	lodsw
	or	ax, ax
	jz	@@0
	cmp	ax, bx
	jz	@@2
	seges	lodsw
	mov	cx, ax
	seges	lodsw
	mul	cx
	shl	ax, 1
	add	si, ax
	jmp	@@1
@@0:	leave
	jmp	SavedGetCursor
@@2:	mov	dx, es
	mov	ax, si
end;

end.
