Date: Tue, 26 Oct 93 9:31:59 EDT From: Frank da Cruz To: Michel Bartholome Subject: Re: Kermit for BTOS and CTOS In-Reply-To: Your message of Tue, 26 Oct 1993 11:34:26 +0200 > A friend of me need Kermit for a Burroughs B28. > In the last version of CT-Kermit(Version 2.00) two files are missing: > CTOBJS.? and CTLIBS.? > CTLIBS.FLS is there. It contains the following two lines: medium.c.lib mwc.lib > >A 'ctobjs' file is supplied, containing a list of > >all .o files. To link, specify @ctobjs for the object modules, and @ctlibs > >(supplied) for libraries. > I can't find the ctobjs file, however, but I assume it would simply contain a list of all the object files produced by the compile step, perhaps something like this: ctaaaa.o ctcmd.o ctconu.o ctctdir.o ctdial.o ctfns.o ctfns2.o ctlogi.o ctmain.o ctprot.o ctuser.o ctusr2.o ctusr3.o ctvt10.o ctxcto.o ctzcto.o Let me know if this is correct. In any case, the binary executable is also supplied in simple hex form as ctct.hex, and so you should not really need to compile from source code. Here is a program that should do the job of decoding the hex file back into a binary: /* UNHEX.C - Program to translate a hex file from standard input * into an 8-bit binary file on standard output. * Usage: unhex < foo.hex > foo.exe * Christine M. Gianone, CUCCA, October 1986. * Modified Aug 89 to work right with Microsoft C on the PC. */ #include /* Include this for EOF symbol */ #ifdef MSDOS #include /* For MS-DOS setmode() symbol */ #endif unsigned char a, b; /* High and low hex nibbles */ unsigned int c; /* Character to translate them into */ unsigned char decode(); /* Function to decode them */ /* Main program reads each hex digit pair and outputs the 8-bit byte. */ main() { #ifdef MSDOS setmode(fileno(stdout),O_BINARY); /* To avoid DOS text-mode conversions */ #endif while ((c = getchar()) != EOF) { /* Read first hex digit */ a = c; /* Convert to character */ if (a == '\n' || a == '\r') { /* Ignore line terminators */ continue; } if ((c = getchar()) == EOF) { /* Read second hex digit */ fprintf(stderr,"File ends prematurely\n"); exit(1); } b = c; /* Convert to character */ putchar( ((decode(a) * 16) & 0xF0) + (decode(b) & 0xF) ); } exit(0); /* Done */ } unsigned char decode(x) char x; { /* Function to decode a hex character */ if (x >= '0' && x <= '9') /* 0-9 is offset by hex 30 */ return (x - 0x30); else if (x >= 'A' && x <= 'F') /* A-F offset by hex 37 */ return(x - 0x37); else { /* Otherwise, an illegal hex digit */ fprintf(stderr,"\nInput is not in legal hex format\n"); exit(1); } }