Browse Prior Art Database

Routine to Add 8 Byte Hex Counters

IP.com Disclosure Number: IPCOM000060680D
Original Publication Date: 1986-Apr-01
Included in the Prior Art Database: 2005-Mar-09
Document File: 1 page(s) / 12K

Publishing Venue

IBM

Related People

Hall, HH: AUTHOR

Abstract

This subroutine adds two 8-byte Hex counters to each other without loss of precision or abending on the occurrence of overflow conditions. It takes the two 8 byte hex counters pointed to by a pair of registers and adds them together using logical arithmetic. The result is placed in the 8 byte field pointed to by one of the registers.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 100% of the total text.

Page 1 of 1

Routine to Add 8 Byte Hex Counters

This subroutine adds two 8-byte Hex counters to each other without loss of precision or abending on the occurrence of overflow conditions. It takes the two 8 byte hex counters pointed to by a pair of registers and adds them together using logical arithmetic. The result is placed in the 8 byte field pointed to by one of the registers. If the result is too large to fit in the register, the value placed there is X'FFFFFFFFFF FFFFFF' ADDHEX8 ADD TWO 8 BYTE FIELDS TOGETHER CLEAR OUT THE WORK AREA SET HEX POWER GET ADDED FROM VALUE LOW 7 BYTES PLACE IN FLOATING REG (FRO) CLEAR OUT THE WORK AREA SET HEX POWER ( *2 TO SHIFT 1 BYTE) GET HIGH ORDER BYTE FROM RECORD ADD TO PREVIOUS VALUE CLEAR OUT THE WORK AREA SET HEX POWER GET ADDED TO VALUE LOW 7 BYTES PLACE IN FRO CLEAR OUT THE WORK AREA SET HEX POWER ( *2 TO SHIFT 1 BYTE) GET HIGH ORDER BYTE FROM BUFFER ADD TO PREVIOUS VALUE SEE IF TOO LARGE BRANCH IF NOT TOO LARGE PUT IN THE LARGEST VALUE AND RETURN TO THE CALLER STFULL3 SAVE THE NEW TOTAL FROM FRO SAVE VALUE GET IN PROPER UNITS STORE BACK INTO WORK AREA MOVE INTO BUFFER THE HIGH 7 BYTES SUBTRACT AMT SAVED FROM FULL TOTAL GET IN PROPER UNITS STORE BACK INTO WORK AREA MOVE INTO BUFFER THE LOW ORDER BYTE AND RETURN TO THE CALLER

Disclosed anonymously.

1