Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Generating Constants With Exclusive OR Instructions

IP.com Disclosure Number: IPCOM000073672D
Original Publication Date: 1971-Jan-01
Included in the Prior Art Database: 2005-Feb-22
Document File: 1 page(s) / 12K

Publishing Venue

IBM

Related People

King, RC: AUTHOR

Abstract

Through the use of an Exclusive OR Immediate (XI) or equivalent instruction, constants can be generated for use in branch tables and similar situations. The method may use less core storage than other methods of generating constants, and consequently may be useful when core space is at a premium.

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

Page 1 of 1

Generating Constants With Exclusive OR Instructions

Through the use of an Exclusive OR Immediate (XI) or equivalent instruction, constants can be generated for use in branch tables and similar situations. The method may use less core storage than other methods of generating constants, and consequently may be useful when core space is at a premium.

As an example of this method, assume that a common routine is to be entered from a branch table. A constant for use in indexing may be associated with each branch table entry. Using the Exclusive OR method, a typical branch table may be set up as follows: ENTA XI CON,B'0001 1100'

ENTB XI C0N,B'0000 0010'

ENTC XI C0N,B'0010 0011'

ENTD XI CON,B'0001 0010'

ENTE XI CON,B'0001 0111'

B COMMON.

The names ENTA...ENTE are the tags for the various table entries. The CON field is set to zero prior to entering the table, and the binary values (B'...') are predefined by the programmer to provide a constant as discussed below. Assume now that the COMMON routine is to be entered via table entry ENTC and that a value of 6 is desired in a specific location when the COMMON routine is entered.

Through the action of the XI instruction at ENTC, the CON field is set to the binary value 0010 0011. The next XI instruction (at ENTD) is executed and the CON field value becomes 0001 0001 (the Exclusive OR of 0010 0011 and 0011 0010). In like manner, when the XI instruction at ENTE is executed, the value of the CON field becomes 0000 0110. The COM...