Xref: utzoo comp.sys.amiga:42100 comp.sys.amiga.tech:7735 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!rpi!batcomputer!riley From: riley@batcomputer.tn.cornell.edu (Daniel S. Riley) Newsgroups: comp.sys.amiga,comp.sys.amiga.tech Subject: Re: Lattice 5.02 Keywords: Eric Message-ID: <9113@batcomputer.tn.cornell.edu> Date: 21 Oct 89 15:05:06 GMT References: <217@masalla.fulcrum.bt.co.uk> <1989Oct21.032150.23093@agate.berkeley.edu> Reply-To: riley@tcgould.tn.cornell.edu (Daniel S. Riley) Organization: Cornell Theory Center, Cornell University, Ithaca NY Lines: 37 In article <1989Oct21.032150.23093@agate.berkeley.edu> mwm@eris.berkeley.edu (Mike (I'll think of something yet) Meyer) writes: >In article <217@masalla.fulcrum.bt.co.uk> sie@fulcrum.bt.co.uk (Simon Raybould) writes: >If you've got a file for BLINK, you specify "DEFINE _main=_tinymain" >in that file. They also claim you can do it on the command line to >BLINK, but I've never tried that. This is documented on page L264. That should probably be __main=__tinymain (two underscores instead of one. You're replacing the routine _main, and Lattice prepends an underscore to every routine name, hence __main). The names may also be different if you are using registerized parameters, since Lattice prepends an @ instead of an _ when you use them. If you use one underscore, I expect that blink would complain about no module _tinymain and multiple definitions of _main. If you do this, you do lose several features of the startup code. No control-c handler is established for you, and the standard i/o files (stdin, stdout, stderr) are *not* opened. You have to open these yourself (or use lower level/AmigaDOS io calls) if you want to read or write something to the console window, even if you're running under a CLI. >For even smaller results, you can change your main routine to _main. >That does away with the all the startup code, including CLI command >line parsing. But look at umain.c yourself. This is good advice--look at umain.c and see what it does. >Side note to Jonas Flygare: have you tried the 5.02 BLINK with 5.04? Gee, I don't even have 5.04 yet. Sounds like it's time to check my mailbox. -Dan Riley (riley@tcgould.tn.cornell.edu, cornell!batcomputer!riley) -Wilson Lab, Cornell U.