/sys$common/syshlp/helplib.hlb MACRO, VAX MACRO Assembler, Instructions, SCANC *Conan The Librarian (sorry for the slow response - running on an old VAX) |
Purpose: To find one of a set of characters in a string Format: opcode len.rw,addr.ab,tbladdr.ab,mask.rb Operation: {mask each character until not zero} C. Codes: N = 0, Z = {R0 EQL 0}, Z = 0, C = 0 Exceptions: None Opcode: 2A SCANC Scan characters Description: The bytes of the string specified by addr and len are used to index into a 256 byte table pointed to by tbladdr. The byte selected from the table is ANDed with mask. The operand proceeds until the result of the AND is nonzero or all the bytes of the string have been exhausted. If a nonzero AND result is detected, the Z bit is cleared; otherwise, the Z bit is set. Notes: After execution: R0 = number of bytes remaining in the string (including the byte that produced the nonzero AND result); R0 is 0 only if there was no nonzero result R1 = address of the byte that produced the nonzero AND result, if no nonzero result, address of one byte beyond the string R2 = 0 R3 = address of the table If the string has 0 length, condition code Z is set just as though the entire string were scanned.
|