Newsgroups: comp.sys.transputer
From: andyr@wizzy.com (Andy Rabagliati)
Subject: Re: Problem loading a 500K program using iserver
Organization: W.Z.I.
Date: Mon, 9 May 1994 22:25:40 GMT
Message-ID: <CpK3Mt.BHr@wizzy.com>

In article <2qm3o4$bo@mimsy.cs.umd.edu>,
Dr. C. Allen Sher <sher@cfar.umd.edu> wrote:
>
>Lately, we have had problem loading our 500K Transputer program 
>onto the Transputer net.

>The program has grown to exceed 500K in size,
>with the individual lku files each having between 60K to 80K.
>Lately, when we try to load the program by doing
>
>	iserver /se /sb file.btl,
>
>we get error messages like
>
>	Error - iserver - unable to write byte -24577 to the boot link
>	because  .

Looking in the source of an old iserver, I see that message. I notice
that the ints being compared are plain ints - maybe you should recompile
iserver with Length and Count as longs.

Cheers,     Andy.


PRIVATE VOID Boot()
{
   FILE *Fd;
   BYTE Buffer[ BOOT_BUFFER_LENGTH ];
   int Length=0, Count=0;                <<----***********************
   INT32 Size=0;
   static BYTE Flicks[]="|/-\\|/-\\" ;
   int Flick=0;

   if ( ( Fd=fopen( BootFileName, "rb" ) ) == NULL )
      ABORT(MISC_EXIT, (SE, "cannot find boot file \"%s\"", BootFileName));
   INFO(("Booting root transputer..."));
   while ( ( Length = fread( Buffer, 1, BOOT_BUFFER_LENGTH, Fd ) ) > 0 )
      {
         DEBUG(("%d", Length));
         Count = WriteLink( TheLink, Buffer, Length, BOOT_TIMEOUT );
         Size += Count;
         if ( Count != Length )
         {
            if (Count < 0)
               ABORT(MISC_EXIT, (SE, "unable to write byte %d to the boot link because\n%s", 
                                             Size, LinkMessages[0-Count]))
            else
               ABORT(MISC_EXIT, (SE, "unable to write byte %d to the boot link", Size ));


