Search code examples
c-preprocessorvisual-c++-6

Meaning of #use directive in legacy VC6 C code


While resurrecting old, VC6 code, I ran into the following

#use "default.h"
#use aasc.lib
#use aascz0.lib

I have have not been able to find documentation for #use. I think the directive is a combination of #include (as in #use "default.h" meaning #include "default.h") and a linkage editor directive (as in #use aasc.lib and #use aascz0.lib being propagated to the object file as maybe a /DYNAMICBASE "aasc.lib" "aascz0.lib"), but I'm not confident.

In any case, the compiler (Visual Studio 2017 Community) rejects the statements with a C1021 diagnostic ("invalid processor command 'use'").

Can any "archeologists" shed light on the #use directive? Thank you.


Solution

  • This isn't VC6 code. Microsoft Visual C 6.0 documentation is still available on the web, and it makes no mention of #use directives. My guess is that you're looking at Dynamic C 6.0 code.

    Dynamic C is a product of Rabbit Semiconductors, which originally was a division of Z-World, Inc but was sold off in 2006 to Digi International. This will probably become a dead link fairly quickly, but here is a Dynamic C manual; grab that while you can... it documents #use.

    In particular, default.h has a set of #use directives for each Rabbit product. AASC.LIB is the Abstract Application-Level Serial Communications library; AASCZ0.LIB contains support functions for built-in Z0 functions, according to this much older reference that seems targeted to Zilog Z180 and Dynamic C version 6.x.