Browse Prior Art Database

Extended Character Scan Instruction

IP.com Disclosure Number: IPCOM000042345D
Original Publication Date: 1984-May-01
Included in the Prior Art Database: 2005-Feb-03
Document File: 4 page(s) / 18K

Publishing Venue

IBM

Related People

Beetcher, RC: AUTHOR [+4]

Abstract

The scan instruction has the ability to scan mixed data including characters represented by two bytes and control characters in ideographic display and printer data streams. The scan instruction finds particular utility in a computer system which can process ideographic character input/output data. The normal one byte or EBCDIC, two-byte ideographic, and control data can be intermixed within the same input/ output data stream, as illustrated in Fig. 1. The scan instruction is a storage to storage instruction with a format as shown in Fig. 2. The operands of the scan instruction are as follows: Operand 1, bits 16-31, specifies the base/displacement for the start address of an area containing control information for the scan operation to be performed.

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

Page 1 of 4

Extended Character Scan Instruction

The scan instruction has the ability to scan mixed data including characters represented by two bytes and control characters in ideographic display and printer data streams. The scan instruction finds particular utility in a computer system which can process ideographic character input/output data. The normal one byte or EBCDIC, two-byte ideographic, and control data can be intermixed within the same input/ output data stream, as illustrated in Fig. 1.

The scan instruction is a storage to storage instruction with a format as shown in Fig. 2. The operands of the scan instruction are as follows: Operand 1, bits 16-31, specifies the base/displacement for the start address of an area containing control information for the scan operation to be performed. Operand 2, bits 32-47, specifies a branch address for a branch to be taken under control of the options mask if an escape code (byte value less than X'40' with exceptions listed below) is encountered in the base string during the scan operation. Operand 3, bits 8-ll, specifies an options mask to be used to control the scan operations. BitsMeaning 8 =0 Branch on encountering an escape code. =1 Do not branch on encountering an escape code. 9 =0 Mixed mode scan. (Recognize shift in/out characters.) =1 Single mode scan. (Do not recognize shift in/out characters.) 0-11 Reserved. Operand 4, bits 12-15, specifies a compare mask to be used to control the completion of the scan operation. Bits 12-14 correspond, left to right, with the three resultant condition codes for this instruction of 0, 1, and 2. The instruction is complete when the result of the comparison of the scan character to a base string character has a corresponding compare mask bit of one. A compare mask of all zeros results in completion of the instruction with a condition code of 'not found'. Bit 15 is reserved. Operand 5, implicitly defined as base register 13, specifies the start address of the base string to be scanned. This value is both input to and output from the instruction. As output from the instruction, it is set to address the character of the base string being operated on when the instruction completes. The string identified by operand 5 is scanned left to right for the character value specified in operand 1 according to criteria specified in the mask fields. The controls operand (operand 1) is a doubleword aligned eight-byte string which specifies additional information to be used to control the scan operation. A specification exception is signalled for improper alignment. It has the following format: Controls Operand Bytes Mode control 0 Reserved 1 Scan character 2 - 3 Reserved 4 Base string end

5 - 7 The mode control value indicates the mode (simple or extended) for the base string character addressed by operand 5 and for the scan character. When a single mode scan is requested in the options mask, the base string and the scan character must be specified as having the same mo...