Xref: utzoo comp.sys.amiga.programmer:3263 alt.sources.amiga:221 Path: utzoo!utgpu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!think.com!mintaka!olivea!tardis!jms From: jms@tardis.Tymnet.COM (Joe Smith) Newsgroups: comp.sys.amiga.programmer,alt.sources.amiga Subject: Re: Short Hello World Summary: OK to depend on binary compatibility Message-ID: <1804@tardis.Tymnet.COM> Date: 6 May 91 05:41:39 GMT References: <1991Apr30.213936.22878@ux1.cso.uiuc.edu> <1991May2.102554.8679@cs.umu.se> <1991May5.011748.11595@zorch.SF-Bay.ORG> Reply-To: jms@tardis.Tymnet.COM (Joe Smith) Organization: BT Tymnet, San Jose, CA Lines: 33 In article <1991May5.011748.11595@zorch.SF-Bay.ORG> xanthian@zorch.SF-Bay.ORG (Kent Paul Dolan) writes: >dvljrt@cs.umu.se (Joakim Rosqvist) writes: >> OpenLib=-408 >> Output=-60 >> Write=-48 >> jsr OpenLib(a6) >> jsr Output(a6) >> jmp write(a6) > >You've managed, in a 15 line program, to include 3 "magic numbers" >that are dependent on the release of dos.library, so that your code need >not merely be reassembled for an operating system upgrade, but rewritten. I was about to post an article saying "don't be absurd, Kent. If Commodore were to change the library offsets, existing binaries would stop working, therefore the offsets are engraved in stone; they will never change." But then I remembered that some of them HAVE changed. OpenLibrary used to be -408, now it is -552. Offset -408 is still supported, however, as OldOpenLibrary. Using the old definitions is works, the program won't get the newest features. >Doing the linker's job for it is _not_ a smart move, as the first >three lines clearly demonstrate. Using the most recent *.h or *.i files is just as good as letting the linker get the definitions out of amiga.lib. -- Joe Smith (408)922-6220 | SMTP: jms@tardis.tymnet.com or jms@gemini.tymnet.com BT Tymnet Tech Services | UUCP: ...!{ames,pyramid}!oliveb!tymix!tardis!jms PO Box 49019, MS-C51 | BIX: smithjoe | CA license plate: "POPJ P," (PDP-10) San Jose, CA 95161-9019 | humorous dislaimer: "My Amiga 3000 speaks for me."