Trailing-Edge
-
PDP-10 Archives
-
BB-H580C-SB_1981
-
siz23.mac
There are 7 other files named siz23.mac in the archive. Click here to see a list.
; UPD ID= 2456 on 2/7/80 at 10:45 AM by NIXON
TITLE SIZ23 FOR LIBOL
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, 1981 BY DIGITAL EQUIPMENT CORPORATION
;EDITS
;NAME DATE COMMENTS
;DMN 7-FEB-80 ;[615] CHECK OVERFLOW FLAGS FOR "ON SIZE ERROR".
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
EXTERNAL RET.2 ;SKIP RETURN
;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
JFCL 11,SIZ23E ;[615] TEST FOR OVERFLOW FLAGS SET
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: CAMGE TA,TH ;COMPARE THE HIGH-ORDER HALVES
JRST RET.2 ;SMALLER, RETURN TO WORD FOLLOWING THE XWD
SIZ23C: CAME TA,TH ;NO, ARE HIGH-ORDER PARTS EQUAL?
JRST SIZ23E ;NO
CAMGE TB,TL ;COMPARE LOW-ORDER HALVES
JRST RET.2 ;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