Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


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

Re: Learning ARM machine code

From Jean-Michel <jmc.bruck@orange.fr>
Newsgroups comp.sys.acorn.programmer
Subject Re: Learning ARM machine code
Date 2025-04-14 11:40 +0200
Organization Jean-Michel
Message-ID <acd65d0d5c.jmb@jmc.bruck.orange.fr> (permalink)
References <5c0c6984e5bavariasound@chiemgau-net.de> <56b9040d5c.harriet@bazleyfamily.co.uk>

Show all headers | View raw


In message <56b9040d5c.harriet@bazleyfamily.co.uk>
          Harriet Bazley <harriet@bazleyfamily.co.uk> wrote:

> On 12 Apr 2025 as I do recall,
>           Alexander Ausserstorfer  wrote:

>> In the book 'Raspberry Pi Assembly Language RISC OS Beginners' von Bruce
>> Smith I'M missing the links to the ARM machine code. I want to see the
>> commands in hex or binary values and want to be able to calculate it by
>> myself.
>> 
>> Is there another book or anything else you can recommend?
>> 
> StrongED can disassemble ARM code instructions for you in Dump mode, so
> technically speaking you can use the BBC BASIC built-in assembler (I
> assume the Bruce Smith book gives instructions for that?), save out the
> area of memory into which you have assembled your code, and inspect it
> in StrongED in order to see the hex values.

> If you look inside !Textseek.Resources you will find the file 'detoken',
> for example, which is just raw machine code that gets loaded and
> executed by the BASIC !RunImage.  It doesn't have any kind of executable
> header or anything, so you can load that directly into Dump mode and
> select the ASM button to ask StrongED to interpret it as assembly
> language, which will display the assembler instructions in one column
> and the raw hex values (and ASCII equivalents) in another.  The 0101
> button will do the same, but displaying the raw values as binary rather
> than hex.

> e.g.
> 0000001C : E92D5FFE : ____ : STMDB   R13!,{R1-R12,R14}
> 00000020 : E24FC024 : ____ : ADR     R12,&00000004      ; ADR -> &00000004
> 00000024 : E28E704C : ____ : ADD     R7,R14,#&4C        ; ="L"
> 00000028 : E58C7010 : ____ : STR     R7,[R12,#16]
> 0000002C : E1A0E00C : ____ : MOV     R14,R12
> 00000030 : E59E0004 : ____ : LDR     R0,[R14,#4]
> 00000034 : E5900000 : ____ : LDR     R0,[R0,#0]
> 00000038 : E280C001 : ____ : ADD     R12,R0,#1
> 0000003C : E08CA002 : ____ : ADD     R10,R12,R2
> 00000040 : E59E0014 : ____ : LDR     R0,[R14,#20]
> 00000044 : E590B000 : ____ : LDR     R11,[R0,#0]
> 00000048 : E28BB001 : ____ : ADD     R11,R11,#1
> 0000004C : E1A0600B : ____ : MOV     R6,R11

> (upper-bit-set characters in the third column blanked out in case it
> messes up the formatting)
It's a good method!
I have :
  Mike Ginns Archimedes Assembly Language (Dab Press) 1988.
and Alex & Nic VAN SOMEREN Archimdes Operating System (Dab Press) 1991.

If you use the BBC Basic Built-in assembly as mentioned above, you add 
lines to your program to see the content of the memory and using the 
Memory command obtain a code in assembler.
For example after NEXT pass
   PRINT
   PRINT "PGM words content"
   size% = 40
  FOR i%= 0 TO size% STEP 4
    PRINT "adress% ";~(code% + i%) SPC(5)"content: " ~code%!i%
  NEXT
  PRINT
  PRINT "PGM words content an disassembled code"
  comd$ = "memoryi " + STR$~code% + " " + STR$~(code% + size%)
  OSCLI comd$
To test...



-- 
Jean-Michel

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


Thread

Learning ARM machine code Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-04-12 15:11 +0200
  Re: Learning ARM machine code Harriet Bazley <harriet@bazleyfamily.co.uk> - 2025-04-13 18:27 +0100
    Re: Learning ARM machine code Jean-Michel <jmc.bruck@orange.fr> - 2025-04-14 11:40 +0200
  Re: Learning ARM machine code Theo <theom+news@chiark.greenend.org.uk> - 2025-04-14 17:56 +0100
    Re: Learning ARM machine code Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-06-07 17:08 +0200
      Re: Learning ARM machine code Sebastian Barthel <naitsabes@freenet.de> - 2025-06-09 13:04 +0000
        Re: Learning ARM machine code Theo <theom+news@chiark.greenend.org.uk> - 2025-06-09 17:36 +0100
          Re: Learning ARM machine code Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-06-10 18:11 +0200
            Re: Learning ARM machine code Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-06-14 17:58 +0200
              Re: Learning ARM machine code Martin <News03@avisoft.f9.co.uk> - 2025-06-14 17:54 +0100
                Re: Learning ARM machine code Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-06-19 06:31 +0200
                Re: Learning ARM machine code Martin <News03@avisoft.f9.co.uk> - 2025-06-19 10:09 +0100
                Re: Learning ARM machine code Jean-Michel <jmc.bruck@orange.fr> - 2025-06-19 11:32 +0200
              Re: Learning ARM machine code Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-11-02 16:42 +0200
                Re: Learning ARM machine code Martin <News03@avisoft.f9.co.uk> - 2025-11-02 17:01 +0000
                Re: Learning ARM machine code Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-11-15 14:55 +0200
                Re: Learning ARM machine code druck <news@druck.org.uk> - 2025-11-17 19:08 +0000
                Re: Learning ARM machine code Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-11-15 15:11 +0200
                Re: Learning ARM machine code Harriet Bazley <harriet@bazleyfamily.co.uk> - 2025-11-15 19:46 +0000
                Re: Learning ARM machine code Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-12-06 17:57 +0200
                Re: Learning ARM machine code Martin <News04@avisoft.f9.co.uk> - 2025-12-06 18:15 +0000
                Re: Learning ARM machine code Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-12-07 16:25 +0200
                Re: Learning ARM machine code Martin <News04@avisoft.f9.co.uk> - 2025-12-07 15:57 +0000
                Re: Learning ARM machine code Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-12-21 17:13 +0200
                Re: Learning ARM machine code druck <news@druck.org.uk> - 2025-12-22 20:02 +0000
                Re: Learning ARM machine code Paul Sprangers <Paul@sprie.nl> - 2025-12-22 23:32 +0100
                Re: Learning ARM machine code Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2026-01-06 14:42 +0200
                Re: Learning ARM machine code anonymouse <na@ignoreme.com> - 2026-01-06 15:02 +0000
                Re: Learning ARM machine code Jean-Michel <jmc.bruck@orange.fr> - 2025-12-08 10:23 +0100
                Re: Learning ARM machine code Harriet Bazley <harriet@bazleyfamily.co.uk> - 2025-12-06 20:06 +0000
                Re: Learning ARM machine code druck <news@druck.org.uk> - 2025-12-09 08:21 +0000
                Re: Learning ARM machine code Martin <News04@avisoft.f9.co.uk> - 2025-12-09 09:48 +0000
                Re: Learning ARM machine code Richard Ashbery <basura@invalid.addr.uk> - 2025-12-09 10:54 +0000
                Re: Learning ARM machine code Steve Fryatt <news@stevefryatt.org.uk> - 2025-11-15 23:46 +0000
                Re: Learning ARM machine code Theo <theom+news@chiark.greenend.org.uk> - 2025-11-16 11:59 +0000
                Re: Learning ARM machine code Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2025-12-06 18:10 +0200
                Re: Learning ARM machine code Steve Fryatt <news@stevefryatt.org.uk> - 2025-12-07 12:18 +0000
          Re: Learning ARM machine code Sebastian Barthel <naitsabes@freenet.de> - 2025-06-10 18:37 +0000

csiph-web