Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-10 - 43,50517/curser.mac
There is 1 other file named curser.mac in the archive. Click here to see a list.
	TITLE CURSER ADDS 580 CURSER POSITIONER


T1=1
T2=2
J=16
P=17

	ENTRY CURSER,HOME,BOTTOM,CURREL


CURSER:	PUSH	P,T1
	PUSH	P,T2
	MOVE	T1,@(J)
	SOJ	T1,
	IONEOU	[13]
	IONEOU	T1
	MOVEI	T1,^D5
	IONEOU	[177]
	SOJG	T1,.-1

	MOVE	T1,@1(J)
	SOJ	T1,
	IDIVI	T1,^D10
	LSH	T1,4
	ADD	T1,T2
	IONEOU	[20]
	IONEOU	T1
	MOVEI	T1,^D5
	IONEOU	[177]
	SOJG	T1,.-1
	POP	P,T2
	POP	P,T1
	POPJ	P,

HOME:	IONEOU	[13]
	IONEOU	[0]
	IONEOU	[20]
	IONEOU	[0]
	POPJ	P,

BOTTOM:	IONEOU	[1]
	POPJ	P,

CURREL:	PUSH	P,T1
	MOVE	T1,@(J)
	PUSH	P,T2
	JUMPE	T1,CURSE1
	MOVEI	T2,32		;ASSUME POS.
	SKIPG	T1
	MOVEI	T2,12		;WRONG AGAIN
	MOVMS	T1
	IONEOU	T2
	SOJG	T1,.-1
CURSE1:	MOVE	T1,@1(J)
	JUMPE	T1,CURSE2
	MOVEI	T2,6
	SKIPG	T1
	MOVEI	T2,25
	MOVMS	T1
	IONEOU	T2
	SOJG	T1,.-1
CURSE2:	POP	P,T2
	POP	P,T1
	POPJ	P,

	END