Groups | Search | Server Info | Login | Register


Groups > comp.sys.acorn.programmer > #6520

Re: File type of machine code? Where does it start?

From Alexander Ausserstorfer <bavariasound@chiemgau-net.de>
Newsgroups comp.sys.acorn.programmer
Subject Re: File type of machine code? Where does it start?
Date 2025-06-19 07:22 +0200
Organization None
Message-ID <5c2f4363e6bavariasound@chiemgau-net.de> (permalink)
References <5c294dfd2cbavariasound@chiemgau-net.de> <lKm*MFveA@news.chiark.greenend.org.uk> <5c29d67fbebavariasound@chiemgau-net.de>

Show all headers | View raw


In article <5c29d67fbebavariasound@chiemgau-net.de>,
   Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote:
> In article <lKm*MFveA@news.chiark.greenend.org.uk>,
>    Theo <theom+news@chiark.greenend.org.uk> wrote:
>> Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote:


>>> Where do I find the starting point of such a code? What is the address
>>> where the machine code is starting?

> > This is the territory of executable formats.

> [...]

> Many thanks! I found the Appendix D: Code file formats in RISC OS 3
> Programmer's Reference Manual Volume 4. I'm not sure if I will
> understand that all. It's a shame that I never read about that in the
> GAG-News or any other publication in a clear understandable way.

I created a new file in !StrongEd and saved it with file type
"application". You can change the file type while saving the file to
anywhere. Then opened the file again. It may be required to chance the
mode to 'dump'. Clicked on 'byte'. Now you can write the commands like
you wish. The last command should always be E0 F0 A0 E1. Then saved the
file and started it by a double click. You can add the command 00 00 A0
E1 (what is doing nothing of course) before. And so on.

I have no idea, why 'word' and 'byte' are reversed. When you click on
word, you have to write

E1 A0 00 00
E1 A0 F0 E0

of course. This is the format it is descripted in the manual of the ARM
(Arm A32/T32 Instrution Set for A-profile architecture) I have here.

An application will always be loaded and started by RISC OS on address
&08000. This is a bit strange because RISC OS can hold different
applications at the same time in the RAM. Normally, the programs would
be overwritten when all are loaded at the same location of memory. But
between the ARM and the RAM you have the MEMC (this I grab from the PRMs 3
- is that still the case today?). The MEMC maps the memory for the
applications and moves it to elsewhere, to a place where is free
memory.

With the instruction A1 A0 F0 E0 at the end you will give the controll
back to RISC OS. It moves the address which was stored in register &E
before calling the programm, back to register &F, which is the programm
counter of the ARM.

For this part I was looking long. It seems to me that there is no direct
introduction to that issue. But it is so fundamental. And it is very
easy to understand. You can examine an application that way, too!

It may look a bit strange to other people to instruct the computer in
such a - I'll call it - 'hard' way. It is the direct way. It is machine
code. The problem is if you are not learning it this 'hard' way and if
you are using all the helpers (assemblers, compilers) from the beginning
on you won't learn real coding nor create an understanding in this issue.

They created the Raspberry Pi to give the people cheap computers to
learn. This alone won't work, of course. You have to give the people the
information to learn, too. And I think this isn't happen. There is a lot
of publication around but nothing what may help people to understand
what's going on. It would be so helpful to have such an publication.

I'm a bit confused by the huge amount of documentation I found about the
ARM. It seems to me that there are existing much different ARM chips
today. What are the differences? Which ones are relevant for RISC OS
today? I'm have some Raspberry Pi's and an Elesar's Titanium. Never read
about this issue.

I'm also a bit confused about the documentation. I have the Programmer's
Reference Manuals here. But they are for RISC OS 3. What was chanced in
meantime, what is still valid from them today? Never read about that issue.

I'll still work further on this project and will still extending my script
about coding the ARM in machine code (later I may include assembler) under
RISC OS. Unfortunately, I'll o all this in German because it is easier for
me. The script will be free available on my web site. I'll update it from
time to time.

Thank you very much for all your help here.

A.
A.

-- 
http://home.chiemgau-net.de/ausserstorfer/

Back to comp.sys.acorn.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

File type of machine code? Where does it start? Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-06-07 17:41 +0200
  Re: File type of machine code? Where does it start? Martin <News03@avisoft.f9.co.uk> - 2025-06-07 18:14 +0100
    Re: File type of machine code? Where does it start? Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-06-08 18:26 +0200
  Re: File type of machine code? Where does it start? Theo <theom+news@chiark.greenend.org.uk> - 2025-06-08 11:02 +0100
    Re: File type of machine code? Where does it start? Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-06-08 18:32 +0200
      Re: File type of machine code? Where does it start? Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-06-19 07:22 +0200
        Re: File type of machine code? Where does it start? Jean-Michel <jmc.bruck@orange.fr> - 2025-06-19 11:23 +0200
          Re: File type of machine code? Where does it start? druck <news@druck.org.uk> - 2025-06-24 20:47 +0100
            Re: File type of machine code? Where does it start? Bob Latham <bob@sick-of-spam.invalid> - 2025-06-25 09:29 +0100
        Re: File type of machine code? Where does it start? Martin <News03@avisoft.f9.co.uk> - 2025-06-19 10:48 +0100
          Re: File type of machine code? Where does it start? Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-06-20 17:22 +0200
            Re: File type of machine code? Where does it start? Matthew Phillips <spam2011m@yahoo.co.uk> - 2025-06-21 08:20 +0100
        Re: File type of machine code? Where does it start? Theo <theom+news@chiark.greenend.org.uk> - 2025-06-20 17:25 +0100

csiph-web