Google
 

Trailing-Edge - PDP-10 Archives - bb-h138f-bm - 7-sources/cmplno.mac
There are 11 other files named cmplno.mac in the archive. Click here to see a list.
	TITLE CMPLNO - COMPARE LINE NUMBERS ROUTINE FOR EDT


; IDENT 1-001

;AUTHOR : GRAHAM BEECH	CREATION DATE : 11-FEB-1983

;******************************************************************************
;*									      *
;*  COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATIO 1978, 1988 ALL RIGHTS RESERVED.*
;* 									      *
;*  THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED    *
;*  ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH  LICENSE AND WITH THE    *
;*  INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR  ANY  OTHER    *
;*  COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY    *
;*  OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY    *
;*  TRANSFERRED.							      *
;* 									      *
;*  THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT  NOTICE    *
;*  AND  SHOULD  NOT  BE  CONSTRUED  AS  A COMMITMENT BY DIGITAL EQUIPMENT    *
;*  CORPORATION.							      *
;* 									      *
;*  DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR  RELIABILITY  OF  ITS    *
;*  SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.		      *
;*									      *
;******************************************************************************


;
;FACILITY:	EDT VERSION 3
;

;FUNCTIONAL DESCRIPTION:
;
; 	THIS MODULE CONTAINS THE ROUTINE TO COMPARE 54-BIT LINE
; 	NUMBERS USED BY EDT VERSION 3.
;
;MODIFIED BY:
;
; 1-001	ORIGINAL.  GB 11-Feb-1983
;--
; THE ROUTINE IS CALLED BY THE FOLLOWING INTERFACE,  TWO SOURCE PARAMETERS
; EACH OF WHICH IS THE ADDRESS OF A 54-BIT UNSIGNED INTEGER.
;

	SALL
	TWOSEG
	RELOC	400000

;
; TABLE OF CONTENTS:
;

	INTERN	CMPLNO
;
; INCLUDE FILES:
;
	SEARCH	MACSYM
	SEARCH	MONSYM

; DEFINITIONS

	T1=1
	T2=2
	T3=3
	T4=4
	P=17
;
; FORMAL PARAMTERS
;
;	P1	POINTER TO SOURCE1
;	P2	POINTER TO SOURCE2
;-
CMPLNO::
	MOVE	T1,-1(P)		;PTR TO FIRST LINE NO.
	MOVE	T2,-2(P)		;PTR TO SECOND LINE NO.
	HRRZ	T3,1(T2)			;GET HI OF LINE 2
	HRRZ	T4,1(T1)			;AND HI OF LINE 1
	CAIGE	T3,(T4)			;LINE 2 < LINE 1?
	JRST	LT			;YES.
	CAIE	T3,(T4)			;EQUAL?
	JRST	GT			;NO. MUST >
	HLRZ	T3,(T2)			;GET MD OF LINE 2
	HLRZ	T4,(T1)			;GET MD OF LINE 1
	CAIGE	T3,(T4)			;LINE 2 < LINE 1?
	JRST	LT			;YES.
	CAIE	T3,(T4)			;EQUAL?
	JRST	GT			;NO. MUST >
	HRRZ	T3,(T2)			;GET LO OF LINE 1
	HRRZ	T4,(T1)			;GET LO OF LINE 2
	CAIGE	T3,(T4)			;LINE 2 < LINE 1?
	JRST	LT			;YES.
	CAIN	T3,(T4)			;EQUAL?
	SKIPA	T1,[0]			;YES. LINE2 = LINE1

GT:	MOVEI	T1,1			;LINE2 > LINE1
	RET

LT:	SETO	T1,			;LINE2 < LINE1
	RET

	END