Trailing-Edge
-
PDP-10 Archives
-
ap-c800d-sb
-
siz23.mac
There are 7 other files named siz23.mac in the archive. Click here to see a list.
; UPD ID= 1720 on 2/22/79 at 10:19 AM by W:<WRIGHT>
TITLE SIZ23 FOR LIBOL V12
SUBTTL CHECK 2-WORD ITEM FOR SIZE ERROR AL BLACKINGTON/CAM
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
; OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;
;COPYRIGHT (C) 1974, 1979 BY DIGITAL EQUIPMENT CORPORATION
SEARCH LBLPRM
HISEG
ENTRY SIZE.2 ;LITERAL TO BE COMPARED AGAINST IS 1 WORD.
ENTRY SIZE.3 ;LITERAL TO BE COMPARED AGAINST IS 2 WORDS.
PP=17 ;PUSH-DOWN POINTER
PA=16 ;INPUT UUO
TA=13 ;HIGH-ORDER AC
TB=14 ;LOW-ORDER AC
TC=15 ;TEMP
TH=10 ;HIGH-ORDER OF LITERAL
TL=11 ;LOW-ORDER OF LITERAL
EXTERNAL SZERA. ;SIZE ERROR INDICATOR
EXTERNAL OVFLO. ;OVERFLOW INDICATION
;EDIT HISTORY
;**** VERSION 12 *****
;DAW 20-FEB-79 [554] ENCLOSE QUAD-WORD ROUTINES IN BIS CONDITIONAL
; THIS IS ACTUALLY PART OF COBOL EDIT 634-- CUSTOMERS MUST
; REBUILD BOTH COBOL AND LIBOL
;CALLING SEQUENCE:
; MOVEI PA,<FIRST OF 2 AC'S TO BE TESTED>
; PUSHJ PP,SIZE.2 (OR SIZE.3)
; XWD <EXIT IF SIZE ERROR>,<ADDRESS OF VALUE TO BE COMPARED AGAINST>
SIZE.2: MOVE TC,@0(PP) ;PICK UP XWD
MOVEI TH,0 ;HIGH ORDER HALF OF LITERAL IS ZERO
MOVE TL,0(TC) ;PICK UP LOW ORDER HALF
JRST SIZ.23
SIZE.3: MOVE TC,@0(PP) ;PICK UP XWD
IFN BIS,<
DMOVE TH,0(TC) ;PICK UP LITERAL
>
IFE BIS,<
MOVE TH,0(TC) ;PICK UP HIGH ORDER OF LITERAL
MOVE TL,1(TC) ;PICK UP LOW ORDER OF LITERAL
>
SIZ.23: SKIPE OVFLO. ;WAS THERE ANY OVERFLOW?
JRST SIZ23E ;YES
MOVE TB,1(PA) ;PICK UP LOW-ORDER AC
SKIPGE TA,0(PA) ;IS HIGH-ORDER PART NEGATIVE?
IFN BIS,<
DMOVN TA,TA ;YES, MAKE POSITIVE
>
IFE BIS,<
JRST SIZ23G ;YES--IT WILL HAVE TO BE MADE POSITIVE
>
SIZ23A: CAML TA,TH ;COMPARE THE HIGH-ORDER HALVES
JRST SIZ23C ;AC IS NOT SMALLER THAN LITERAL
SIZ23B: AOS (PP) ;RETURN TO WORD FOLLOWING THE XWD
POPJ PP,
SIZ23C: CAME TA,TH ;ARE HIGH-ORDER PARTS EQUAL?
JRST SIZ23E ;NO
CAMGE TB,TL ;COMPARE LOW-ORDER HALVES
JRST SIZ23B ;AC LESS THAN LITERAL--OK
SIZ23E: HLRM TC,0(PP) ;NO--SIZE ERROR--SET UP RETURN
SETOM SZERA. ;SET ERROR INDICATOR
POPJ PP,
IFE BIS,<
SIZ23G: SETCA TA, ;NEGATE AC (IN ORDER TO GET POSITIVE)
TLO TB,1B18 ;INSURE THAT LOW-ORDER PART HAS SIGN
MOVMS TB ;GET MAGNITUDE OF LOW-ORDER HALF
TLZ TB,1B18 ;INSURE SIGN BIT IS ZERO
JUMPN TB,SIZ23A ;IF LOW-ORDER HALF NOT ZERO, OK
AOJA TA,SIZ23A ;LOW-ORDER HALF ZERO, BUMP HIGH-ORDER
>
SUBTTL CHECK 4-WORD ITEM FOR SIZE ERROR IN LOWER 2-WORDS
IFN BIS,< ;[554] PUT IN BIS CONDITIONAL
ENTRY SIZE.4 ;LITERAL TO BE COMPARED AGAINST IS 1 WORD.
ENTRY SIZE.5 ;LITERAL TO BE COMPARED AGAINST IS 2 WORDS.
SIZE.4: PUSHJ PP,SIZE4T ;TEST HIGH 2-WORDS
JRST SIZE.2 ;TEST LOWER 2-WORDS
SIZE.5: PUSHJ PP,SIZE4T ;TEST HIGH 2-WORDS
JRST SIZE.3 ;TEST LOWER 2-WORDS
SIZE4T: SKIPE TH,0(PA) ;BOTH WORDS MUST BE 0
AOJN TH,SIZE4F ;OR -1
SKIPE TL,1(PA)
AOJN TL,SIZE4F
ADDI PA,2 ;POINT TO LOWER 2-WORDS
POPJ PP,
SIZE4F: POP PP,(PP)
MOVE TC,@0(PP) ;PICKUP XWD
JRST SIZ23E ;FAILED
>;END IFN BIS ;[554]
END