home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.os.vms      DEC's VAX* line of computers & VMS.      264,096 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 262,260 of 264,096   
   John Reagan to All   
   Re: Fun trick   
   13 Jan 25 21:11:29   
   
   From: johnrreagan@earthlink.net   
      
   On 1/13/2025 5:55 PM, Arne Vajhøj wrote:   
   > On 1/13/2025 5:18 PM, Lawrence D'Oliveiro wrote:   
   >> On Mon, 13 Jan 2025 13:45:50 -0500, Arne Vajhøj wrote:   
   >>> There are probably a lot of shareable images written in C out there   
   >>> where the developer has no idea that they are runnable or what code will   
   >>> run.   
   >>   
   >> If it has no main(), then nothing will run.   
   >   
   > That is what the developer thinks.   
   >   
   > But it is not so.   
   >   
   > $ type lawrence.c   
   > #include    
   >   
   > int foobar()   
   > {   
   >      printf("Hi Lawrence\n");   
   >      return 1;   
   > }   
   > $ cc lawrence   
   > $ link/share  lawrence   
   > $ run lawrence   
   > Hi Lawrence   
   >   
   > No main() and it runs anyway.   
   >   
   > Arne   
   >   
   COBOL paragraphs behave like C.  First routine/PARAGRAPH gets a WEAK   
   transfer address.  Linker finds the first one.  Shuffle modules around   
   and you'll get different transfer addresses.  Pascal just creates a   
   STRONG transfer address for a PROGRAM statement.   
      
   --- SoupGate-DOS v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca