Differences

This shows you the differences between two versions of the page.

Link to this comparison view

instructions:sdu [2008/11/25 11:58] (current)
scott created
Line 1: Line 1:
 +====== Scan to Delimiter - Unequal (SDU)/OP=17 ======
 +
 +==== Format ====
 +
 +^  OP  ^  AF  ^  BF  ^  A Syllable  ^  B Syllable  ^
 +
 +''OP = 17''
 +
 +**AF** is the length of the **A** field.  A value of __00__ is equal to
 +a length of __100__ units (digits or characters as specified by the
 +**A** address controller).  **AF** may be indirect or may indicate that the
 +**A** syllable is a literal.\\
 +**BF** is the length of the **B** field.  A value of __00__ is equal to
 +a length of __100__ units (digits or characters as specified by the **B**
 +address controller). **BF** may be indirect.
 +
 +The //A Syllable// is the address of the delimiter list field. Address may be
 +indexed, indirect or extended.  The final address controller data type
 +may be **UN**, **SN** or **UA**.   An **SN** controller is treated as
 +if it were a **UN** controller (i.e. 7SN == 7UN).\\
 +The //B Syllable// is the address of the data field to be scanned.
 +Address may be
 +indexed, indirect or extended.  The final address controller data type 
 +may be **UN**, **SN** or **UA**.   An **SN** controller is treated as
 +if it were a **UN** controller (i.e. 7SN == 7UN).
 +
 +==== Function ====
 +
 +The Scan to Delimiter - Unequal instruction scans
 +the **B** field for a character
 +not equal to any of the delimiter characters from the **A** field.
 +
 +The first **B** field character is compared to each delimiter (**A**) field
 +character until a match is found.   If a match is found, the next **B** field
 +character is compared to each delimiter.   Continue this process until
 +no matching delimiter is found or until the **B** field is exhausted.
 +
 +If a numeric data type (**UN**/**SN**) is specified in either field add
 +the **EBCDIC** zone digit **F** to each digit to form the character for
 +use in the comparison.
 +
 +This instruction stores the number of characters in the **B** data field
 +//preceeding// the equal character into memory locations __38-39__,
 +relative to Base #0 (accessible with indirect field length).  However, if
 +no equal character is found, store the field length of the data field minus
 +one (**BF** - 1).
 +
 +
 +==== Comparison Flags ====
 +
 +Set the [[processor_state:comparison_flags|Comparison Flags]] to **HIGH**
 +if all the characters in the **B** field were found to be equal to any
 +delimiter in the **A** field.  Set the Comparison Flags to **LOW** if
 +the first character in the **B** field was not equal to any delimiter and
 +set the Comparison Flags to **EQUAL** if some other character is unequal.
 +
 +==== Overlap ====
 +
 +There are no overlap restrictions for this instruction.
 +
 +==== Examples ====
 +
 +=== Example (1) Scan Delimiter-Unequal, First digit unequal ===
 +
 +^  OP  ^  AFBF  ^  A Syllable  ^  B Syllable  ^
 +|  17  |  0304  |  A Field (UN)  |  B Field (UN)  |
 +
 +                      BEFORE              AFTER
 +     A Field           123              unchanged
 +     B Field          6123              unchanged
 +     000038             nn                  00
 +
 +     Comparison Flags   nn                 LOW
 +
 +=== Example (2) Scan Delimiter-Unequal, Other than first digit unequal ===
 +
 +^  OP  ^  AFBF  ^  A Syllable  ^  B Syllable  ^
 +|  17  |  0304  |  A Field (UA)  |  B Field (UA)  |
 +
 +                      BEFORE              AFTER
 +     A Field         C1C2C3             unchanged
 +     B Field         C1C2C3C4           unchanged
 +     000038             nn                  03
 +
 +     Comparison Flags   nn                 EQUAL
  
instructions/sdu.txt ยท Last modified: 2008/11/25 11:58 by scott
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki