GN_Lut, Lookup table facility

Register parameters

RST 20H, DEFW $8E09

IN: BHL = lookup table address (B=0, local)
    CDE = key (null terminated string) to search
    A = search options
        A0 = 1, case sensitive
        A0 = 0, case insensitive

 Lookup table format : keys have to be alphabetically sorted (ASCII sorted table if symbol are used)

 defb N                       ; number of entries
 defm "key1",0, pointer1      ; first entry, null terminated followed by a 16bit pointer
 defm "key2",0, pointer2      ; second entry
 defm "keyN",0, pointerN      ; Nth and last entry

out, if successful:
        Fc = 0key found and associated pointer returned in HL
out, if failed:
        Fc = 1A = error code
             RC_Eof, no matching string found
   registers changed after return:
        A.BC.E../IXIY  same
        .F..D.HL/....  different


  • API call implemented in OZ 5.0
  • This call is used by Shell, debugger or man command to deal with command names

web analytics