🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #5502

Writing small code in SAS/C 5.10

#5502
From: Parker Lord
Date: Thu, 27 Sep 1990 15:45
17 lines
1626 bytes
I wrote myself a unix like 'mv' command because the AmigaDOS rename seemed
to limited.  My problem is that the linked code comes out to be about 9K.
I used the SD SC ND flags with Blink.  I thought that this was rather large
for the amount of code actually written so I tried a test.  I wrote a one line
program that does nothing more than a printf("Hello\n");  I compiled and linked
this using lc -L.  This code came out at about 4.6K.  In comparison, the
AmigaDOS rename command is less than 1K and the ARP mv command is about 1K.
Are there some general guidelines to follow to make linked code smaller?  
I also invoked the global optimizer with lc, but that didn't help at all.
+--------------------------------------------------------------------------+
|                                   //     AA   M     M I GGGGGG    AA     |
|     Parker J. Lord               //     A  A  MM   MM   G        A  A    |
|     lord@leadsv.UUCP            //     A    A M M M M I G       A    A   |
|     415-326-7539          \\   //      AAAAAA M  M  M I G   GGG AAAAAA   |
|                            \\ //       A    A M     M I G    G  A    A   |
|                             \\/        A    A M     M I GGGGGG  A    A   |
+--------------------------------------------------------------------------+
Technical Details
Message-ID: <13148@leadsv.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!seismo!dimacs.rutgers.edu!mips!prls!pyramid!leadsv!lord

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!seismo!dimacs.rutgers.edu!mips!prls!pyramid!leadsv!lord
From: lord@leadsv.UUCP (Parker Lord)
Newsgroups: comp.sys.amiga.tech
Subject: Writing small code in SAS/C 5.10
Message-ID: <13148@leadsv.UUCP>
Date: 27 Sep 90 15:45:12 GMT
Organization: LOCKHEED, Sunnyvale, CA
Lines: 17