Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #585
| From | Martin Bazley <martin.bazley@blueyonder.co.uk> |
|---|---|
| Newsgroups | comp.sys.acorn.programmer |
| Subject | Re: AIF header - how? |
| Message-ID | <8b8f260152.martin@blueyonder.co.uk> (permalink) |
| References | <52010da5d2bob@sick-of-spam.invalid> |
| Organization | virginmedia.com |
| Date | 2011-08-11 16:43 +0100 |
The following bytes were arranged on 11 Aug 2011 by Bob Latham : > Hi, > > I've just found out that none of the programs I've ever written will run > on OS6.20. They all give an error message "The application uses an > obsolete executable file format which is no longer supported by RISC OS". > > After a large amount of googling it seems I need to provide an AIF header. An AIF header is what files of type Absolute (&FF8) typically start with. I don't know specifics, but I do know that it's of a fixed size, and that the first 16 bytes (4 words) are all either branch commands to various areas of the program which are defined to do certain tasks, or "MOV R0,R0" if not applicable to this program. The first instruction jumps to decompression code, if the executable is compressed, and I think the fourth jumps to the program proper. The fifth word is always the instruction "SWI OS_Exit". AIF headers are generated automatically by all C compilers, with the exception of recent versions of GCC which enforce a Unix format called ELF instead, so if your program didn't work then it wasn't written in C. There's no practical reason why a program shouldn't run without an AIF header, but ROL in their infinite wisdom have decided suddenly to enforce a whole lot of standards for no particular reason at all, including some (like the Utility header) which didn't even exist before they enforced them. The reason invariably given is 32-bit compatibility, and the capability to automatically patch old software to run on new machines, which is a bit rich given that none of ROL's modern products run on a 32-bit machine and Acorn's patch mechanism has never once been used in its 15-year history. The underlying problem is the same as the one which infamously caused ROL OSes to start refusing to run binaries compressed using modern versions of the Squeeze tool - the notorious "Unable to start application (decompression failed)" error, in spite of the fact that there was nothing actually wrong with the binaries. However, unlike the decompression problem, ROL *have* built in a workaround for the AIF problem. In Configure, there's a section called "Compatibility", in which every single option button should be ticked. If you do this, Configure will warn you that you are potentially jeopardising your computer by running unstable software. Ignore it, it's lying - unless you consider your software, and a lot of other long-used programs, to be unstable. -- __<^>__ Red sky in the morning: Shepherd's warning / _ _ \ Red sky at night: Shepherd's delight ( ( |_| ) ) Mince and potatoes: Shepherd's pie \_> <_/ ======================= Martin Bazley ==========================
Back to comp.sys.acorn.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
AIF header - how? Bob Latham <bob@sick-of-spam.invalid> - 2011-08-11 12:11 +0100
Re: AIF header - how? Martin Bazley <martin.bazley@blueyonder.co.uk> - 2011-08-11 16:43 +0100
Re: AIF header - how? Bob Latham <bob@sick-of-spam.invalid> - 2011-08-11 17:21 +0100
Re: AIF header - how? cferris@freeRemoveuk.com.invalid - 2011-08-11 20:11 +0100
Re: AIF header - how? Bob Latham <bob@sick-of-spam.invalid> - 2011-08-11 21:19 +0100
Re: AIF header - how? John Tytgat <this@is.invalid> - 2011-08-12 12:58 +0200
Re: AIF header - how? cferris@freeRemoveuk.com.invalid - 2011-08-12 13:11 +0100
Re: AIF header - how? druck <news@druck.org.uk> - 2011-08-13 15:09 +0100
Re: AIF header - how? jgharston <jgh@arcade.demon.co.uk> - 2011-08-11 15:49 -0700
Re: AIF header - how? Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-08-13 00:57 +0200
Re: AIF header - how? Bob Latham <bob@sick-of-spam.invalid> - 2011-08-13 10:42 +0100
csiph-web