[comp.sys.ibm.pc] Cursor.asm

root@conexch.UUCP (Larry Dighera) (10/09/89)

In article <3374@jane.uh.edu> BCHS1B@jane.uh.edu writes:
>In article <2259@trev.dsir.govt.nz>, srpdsdj@trev.dsir.govt.nz writes:
>> Help, does anyone know if it is possible to change the cursor shape in
>> WordPerfect 5.0, it's just that the blinking underscore is sometimes 
>> damned hard to find. i.e. a block would be a lot easier.
>> 
>> Thanks if anyone can help.
>> 
>> STEPHEN.
>
>Wordperfect actually distributes a program called Cursor.com which
>should be on the distribution disks somewhere. Perhaps the learning
>disk. But it should do what you want.
>Mike Benedik

Here is cur, a little utility I wrote to change the cursor to a block
or its normal underline.  The syntax is: cur n for normal or cur b for 
block.

;Written by Larry Dighera.  
;USPS: The Consultants' Exchange, PO Box 12100, Santa Ana, CA  92712
;TELE: (714) 842-6348: BBS (N81); (714) 842-5851: Xenix guest account (E71)
;UUCP: conexch Any ACU 2400 17148425851 ogin:-""-ogin:-""-ogin: nuucp
;UUCP: ...!uunet!spsd!conexch!root || ...!ccicpg!conexch!root
;
code	segment para
	assume cs:code,ds:code
	org 100h
cursor	proc far
; Parse command line argument
i3:	mov	bx,80h		;PSP address
	mov	al,[bx]		;Byte count
	cmp	al,0
	jne	i5
i4:	mov	ah,9		;Error message out
	lea	dx,messn
	int	21h
	xor	ax,ax
	int	21h
i5:	inc	bx		;Get first valid character
	mov	al,[bx]
	cmp	al,32		;space = junk
	je	i5		;loop if space
	cmp	al,13		;cr?
	je	i4		;send error message if no argument
	cmp	al,90		;upper case?
	ja	i6		;jump if lc
	xor	ah,ah
	add	ax,32		;convert to lc
i6:	cmp	al,98		;is it a b?
	je	blk
	cmp	al,110		;is it an n?
	je	norm
	jmp	i4
blk:	mov	ah,15		;set up for BIOS interrupt
	int	10h		;get display mode
	cmp	al,7		;mono?
	je	blkm 		;
	mov	ah,1		;set up for BIOS interrupt
	mov	cx,0c0dh	;set cursor to block
	int	10h
	int	20		;finished
blkm:	mov	ah,1
	mov	ch,1
	mov	cl,13
	int	10h
	int	20h
norm:	mov	ah,15
	int	10h
	cmp	al,7
	je	normm
	mov	ah,1
	mov	ch,6
	mov	cl,7
	int	10h
	int	20h
normm:	mov	ah,1
	mov	ch,12
	mov	cl,13
	int	10h
	int	20h
done:	xor	ax,ax
	int	21h
messn	db	'Cursor: No valid argument specified. '
	db	' Use: B for block or N for normal',13,10,'$'
cursor	endp
code	ends
	end	cursor
-- 
USPS: The Consultants' Exchange, PO Box 12100, Santa Ana, CA  92712
TELE: (714) 842-6348: BBS (N81); (714) 842-5851: Xenix guest account (E71)
UUCP: conexch Any ACU 2400 17148425851 ogin:-""-ogin:-""-ogin: nuucp
UUCP: ...!uunet!spsd!conexch!root || ...!ccicpg!conexch!root