Grrrr!!!!!!! Ok, so. My m100.def has, for SmallC purposes, 3 classes of equates. ROM function that don't require arguments or return values, ROM functions that do require args or return values, and system variables.
Because I use sed to translate the ASM/ZMAC original equates into ASX syntax global equates, these all end up as global labels that are stored, name and value, in the .rel object files. This means that the first class of functions can be called with no further code from Small C. The second type of function requires wrapper functions. And that's. All good. And I really really hoped that the system variables would be as easily used. Unfortunately it's not to be. A reference to extern char *CRSX (x=CRSX) generates "lhld CRSX \n mov a,m" when what I need is "lxi h, CRSX\n mov a,m" . I am very sad. I've looked through the code generator already and there's no hope. It looks like the best I can do is have the system variable names as #defines. Anything else would result in a huge tabke of pointers in the .co file that might not even be used! Willard Sent from Samsung tablet
