The LazyBoy Library Manual - StrVal

Part of the Strings group.

%imacro StrVal 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 only the value portion.

%1 on input is pointer to the KEY string for the search. On output, the register pair is a pointer to the value portion of the 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 value in ES:DI if found.

See also: StrKey.