Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sdd.hp.com!decwrl!shelby!msi-s0.msi.umn.edu!cs.umn.edu!!jdege From: jdege@ (Jeff Dege) Newsgroups: comp.sys.amiga.tech Subject: Re: Writing small code in SAS/C 5.10 Message-ID: <1990Oct2.014934.7294@cs.umn.edu> Date: 2 Oct 90 01:49:34 GMT References: <13148@leadsv.UUCP> <1990Oct01.212023.9242@unx.sas.com> Sender: news@cs.umn.edu (News administrator) Reply-To: jdege@donald.UUCP (Jeff Dege) Organization: University of Minnesota, Minneapolis Lines: 36 Nntp-Posting-Host: donald.cs.umn.edu In article <1990Oct01.212023.9242@unx.sas.com> walker@unx.sas.com (Doug Walker) writes: > Try the following for a 132-byte program to do what >yours does: > >#include >#include > >struct DosLibrary *DOSBase; > >void foo(void) >{ > DOSBase = OpenLibrary("dos.library", 0); > Write(Output(), "Hello\n", 6); > CloseLibrary(DOSBase); >} > >Use the following to compile and link it: > >lc foo >blink from foo.o to foo > >Note that you don't link with c.o, and you don't link with lc.lib or >amiga.lib. > > > ***** >=*|_o_o|\\=====Doug Walker, Software Distiller====== BBS: (919)460-7430 = I tried it, and it didn't work. BLINK complained about undefined names. The solution, of course, is to turn off stack checking: "lc -v foo". I thought I'd mention it before folks started complaining (and it ended up as 136 bytes ;) ---------------- ??