8000 - help needed' (03/25/89)
[I attempted to post this before, but I don't think it got very far -- a problem with my verison of postnews. Here 'tis again, sorry if you've seen this already.] 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. Please send me Email. Site per2 does not receive comp.unix.wizards or comp.misc. It does get comp.sources.wanted, but I don't think that that is the place for a dialogue. If anyone wants to know what I find out, send me Email and I'll Email you a summary of what I find out. 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-----------