Article View: comp.sys.amiga.tech
Article #13670Re: First bug in Manx 5.0?
From: Allan Duncan
Date: Tue, 13 Feb 1990 03:33
Date: Tue, 13 Feb 1990 03:33
23 lines
1528 bytes
1528 bytes
>
> The 'unable to load bug: Error 2220548' message is, I believe, an error
> in the shell, not in bug. What happens is that (if memory serves) if a
> programs returns a negative error code, the CLI says it was unable to load the
> program (never mind that the program was already loaded and executed). So, all
> that is happening is that readchar() (or whatever routine it was you were
> calling) is leaving a negative number in D0, which is getting returned from
> main(), and there you have it.
>
I presume that readchar() is like the rest of them and returns -1 on
EOF. However, this value should not be passed on to the return from
main - falling off the end is equivalent to exit(0).
I would look at the source for _main() and crt0.a
Allan Duncan ACSnet aduncan@rhea.trl.oz
ARPA aduncan%rhea.trl.oz.au@uunet.uu.net
UUCP {uunet,hplabs,ukc}!munnari!rhea.trl.oz.au!aduncan
Telecom Research Labs, PO Box 249, Clayton, Victoria, 3168, Australia.
Allan Duncan ACSnet aduncan@rhea.trl.oz
ARPA aduncan%rhea.trl.oz.au@uunet.uu.net
UUCP {uunet,hplabs,ukc}!munnari!rhea.trl.oz.au!aduncan
Telecom Research Labs, PO Box 249, Clayton, Victoria, 3168, Australia.
Technical Details
Message-ID:
<1025@trlluna.trl.oz>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!munnari.oz.au!bruce!trlluna!rhea.trl.oz.au!aduncanShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!munnari.oz.au!bruce!trlluna!rhea.trl.oz.au!aduncan From: aduncan@rhea.trl.oz.au (Allan Duncan) Newsgroups: comp.sys.amiga.tech Subject: Re: First bug in Manx 5.0? Message-ID: <1025@trlluna.trl.oz> Date: 13 Feb 90 03:33:38 GMT Sender: root@trlluna.trl.oz Lines: 23