dag@per2.UUCP (03/31/89)
I am trying to port a large set of C programs to my Zilog Zeus (Unix SysIII) system, and have run up against a problem that I hope someone may be able to help me out with. The C compiler on this machine takes advantage of the "large" number of registers in the Z8001 CPU when passing parameters. Some parameters get passed in the registers, the rest on the stack. The system manuals contain information as to the register allocation algorithm and include a sample C function which is supposed to take arbitrary argument lists (ala printf), but the code apparently did not make it through troff unmunged, and several "#define"s ended up with a value of 0. So far, I've been unable to figure out what the values of these defines are supposed to be. The system also came with the file /usr/include/varargs.h, but there is no mention of it in any of the docs, and the definitions in it appear to assume that all the arguments are on the stack. Many (most) of the useful tools available over comp.sources.{unix,misc} contain printf-like functions. I need to modify these functions for this system. I don't know how. I'm reduced to multiple functions and/or rewriting large portions of the function-calls to contain much of the functions code. If anybody has a C code example of a printf-like function that works on a Zilog "Zeus" system, please send me E-mail. A vsprintf implementation for this machine would be most helpful (as most of these printf-like functions pass most of the parameters to sprintf, fprintf or printf.) Note: I know how to do this on a PDP-11, VAX, i80x86, m68000, ... I know the C language quite well. I don't need a tutorial in writing C code. Thanks in advance -- Daniel A. Glasser ...!uwvax!per2!dag --- _____________________________________________________________________________ Daniel A. Glasser One of those things that goes uwvax!per2!dag "BUMP!!!(ouch)" in the night. ---Persoft, Inc.---------465 Science Drive-------Madison, WI 53711-----------