; ; tree.sh ; ; Another attempt at symbol table management ; ; © 1995 Straylight ; ;----- Overview ------------------------------------------------------------- ; ; Functions provided: ; ; tree_add ; tree_find ; str_cmp [ :LNOT::DEF:tree__dfn GBLL tree__dfn ; --- tree_add --- ; ; On entry: R0 == type number ; R1 == address of name ; R2 == size of user data ; ; On exit: R0 == address of user data in new node ; CS if node already exists, else CC ; May return an error ; ; Use: Adds a node into a symbol table tree. IMPORT tree_add ; --- tree_find --- ; ; On entry: R0 == type number ; R1 == pointer to the name ; ; On exit: CS if the variable was found, and ; R0 == pointer to the variable block ; else CC and ; R0 corrupted ; ; Use: Tries to find a node with the given type and name in ; the symbol tree. IMPORT tree_find ; --- str_cmp --- ; ; On entry: R0 == pointer to string A ; R1 == pointer to string B ; ; On exit: Flags as appropriate ; ; Use: Case-sensitively compares two strings. You can use the ; normal ARM condition codes after the compare, so you can ; treat this fairly much like a normal CMP. IMPORT str_cmp ] ;----- That's all, folks ---------------------------------------------------- END