The LazyBoy Library Manual - StrKey

Part of the Strings group.

%imacro StrKey 2-3
Prefers: ES:DI, DS:SI
Prefers: ES:DI, DS:SI, exact

Lookup a string KEY in a list of strings and return a pointer to the entire string.

%1 on input is pointer to the KEY string for the search. On output, the register pair is a pointer to the entire string when found or the NULL string at end of the list.

%2 on input is pointer the ASCIIZ list of strings to search. If no segment is provided, DS is assumed. Unless %2 is a LABEL, then CS is assumed.

%3 is type of matching, defaults to CASELESS. If %3 is EXACT, then searching will be case specific.

The Carry Flag will be set if the string is not found.

Examples:

    StrKey es:di, si   ; Search table at DS:SI in for string ES:DI, return a pointer
                       ; to string in ES:DI if found.

See also: StrVal.