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


Groups > comp.sys.acorn.programmer > #6502 > unrolled thread

Learning ARM machine code

Started byAlexander Ausserstorfer <bavariasound@chiemgau-net.de>
First post2025-04-12 15:11 +0200
Last post2025-06-10 18:37 +0000
Articles 20 on this page of 38 — 12 participants

Back to article view | Back to comp.sys.acorn.programmer


Contents

  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

Page 1 of 2  [1] 2  Next page →


#6502 — Learning ARM machine code

FromAlexander Ausserstorfer <bavariasound@chiemgau-net.de>
Date2025-04-12 15:11 +0200
SubjectLearning ARM machine code
Message-ID<5c0c6984e5bavariasound@chiemgau-net.de>
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?

Thanks,

A.

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

[toc] | [next] | [standalone]


#6503

FromHarriet Bazley <harriet@bazleyfamily.co.uk>
Date2025-04-13 18:27 +0100
Message-ID<56b9040d5c.harriet@bazleyfamily.co.uk>
In reply to#6502
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)


-- 
Harriet Bazley                     ==  Loyaulte me lie ==

The attacker must vanquish; the defender need only survive.

[toc] | [prev] | [next] | [standalone]


#6504

FromJean-Michel <jmc.bruck@orange.fr>
Date2025-04-14 11:40 +0200
Message-ID<acd65d0d5c.jmb@jmc.bruck.orange.fr>
In reply to#6503
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

[toc] | [prev] | [next] | [standalone]


#6505

FromTheo <theom+news@chiark.greenend.org.uk>
Date2025-04-14 17:56 +0100
Message-ID<buh*s+0-z@news.chiark.greenend.org.uk>
In reply to#6502
Alexander Ausserstorfer <bavariasound@chiemgau-net.de> 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?

Arm has documentation of the A32 instruction encoding, starting from the
most significant bits and drilling your way down:
https://developer.arm.com/documentation/ddi0597/2025-03/A32-Instructions-by-Encoding

Going the other way, if you start at the top level of that manual and work
down by instruction type:
https://developer.arm.com/documentation/ddi0597/2025-03?lang=en

each instruction shows its encoding.  eg there are three entries for MOV,
depending on what's on the right hand side:

https://developer.arm.com/documentation/ddi0597/2025-03/Base-Instructions/MOV--MOVS--immediate---Move--immediate--?lang=en
https://developer.arm.com/documentation/ddi0597/2025-03/Base-Instructions/MOV--MOVS--register---Move--register--?lang=en
https://developer.arm.com/documentation/ddi0597/2025-03/Base-Instructions/MOV--MOVS--register-shifted-register---Move--register-shifted-register--?lang=en

Not all instructions are available on all CPUs, of course.

Theo

[toc] | [prev] | [next] | [standalone]


#6508

FromAlexander Ausserstorfer <bavariasound@chiemgau-net.de>
Date2025-06-07 17:08 +0200
Message-ID<5c294aefcbbavariasound@chiemgau-net.de>
In reply to#6505
In article <buh*s+0-z@news.chiark.greenend.org.uk>,
   Theo <theom+news@chiark.greenend.org.uk> wrote:
> Alexander Ausserstorfer <bavariasound@chiemgau-net.de> 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?

> Arm has documentation of the A32 instruction encoding, starting from
> the most significant bits and drilling your way down:

...

> Not all instructions are available on all CPUs, of course.

Many thanks! I was not able to see the pages at home, however. I
downloaded a PDF (8 MB) now elsewhere.

I begun to write an introduction

http://home.chiemgau-net.de/ausserstorfer/Temp/2022-05-26/Skript.pdf (5
kB)

in German for me to learn and teach myself. May be that I include the
new 8 bit home computer Mega65 from Trentz Elektronik there later as
well.

A.

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

[toc] | [prev] | [next] | [standalone]


#6513

FromSebastian Barthel <naitsabes@freenet.de>
Date2025-06-09 13:04 +0000
Message-ID<1026m5i$jcpt$4@solani.org>
In reply to#6508
An einem Sat, 07 Jun 2025 17:08:01 +0200 schrieb der Meister Alexander
Ausserstorfer:

> In article <buh*s+0-z@news.chiark.greenend.org.uk>,
>    Theo <theom+news@chiark.greenend.org.uk> wrote:
>> Alexander Ausserstorfer <bavariasound@chiemgau-net.de> 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?
> 
>> Arm has documentation of the A32 instruction encoding, starting from
>> the most significant bits and drilling your way down:
> 
> ...
> 
>> Not all instructions are available on all CPUs, of course.
> 
> Many thanks! I was not able to see the pages at home, however. I
> downloaded a PDF (8 MB) now elsewhere.
> 
> I begun to write an introduction
> 
> http://home.chiemgau-net.de/ausserstorfer/Temp/2022-05-26/Skript.pdf (5
> kB)
> 
> in German for me to learn and teach myself. May be that I include the
> new 8 bit home computer Mega65 from Trentz Elektronik there later as
> well.
> 
> A.

The link doesn't work.


-- 
holy miau is a snake

[toc] | [prev] | [next] | [standalone]


#6514

FromTheo <theom+news@chiark.greenend.org.uk>
Date2025-06-09 17:36 +0100
Message-ID<iKm*CnCeA@news.chiark.greenend.org.uk>
In reply to#6513
Sebastian Barthel <naitsabes@freenet.de> wrote:
> An einem Sat, 07 Jun 2025 17:08:01 +0200 schrieb der Meister Alexander
> Ausserstorfer:
> 
> > I begun to write an introduction
> > 
> > http://home.chiemgau-net.de/ausserstorfer/Temp/2022-05-26/Skript.pdf (5
> > kB)
> > 
> > in German for me to learn and teach myself. May be that I include the
> > new 8 bit home computer Mega65 from Trentz Elektronik there later as
> > well.
> > 
> > A.
> 
> The link doesn't work.

It's 2025 already.  This works for me:
http://home.chiemgau-net.de/ausserstorfer/Temp/2025-05-26/Skript.pdf

[toc] | [prev] | [next] | [standalone]


#6515

FromAlexander Ausserstorfer <bavariasound@chiemgau-net.de>
Date2025-06-10 18:11 +0200
Message-ID<5c2adc4465bavariasound@chiemgau-net.de>
In reply to#6514
In article <iKm*CnCeA@news.chiark.greenend.org.uk>,
   Theo <theom+news@chiark.greenend.org.uk> wrote:
> Sebastian Barthel <naitsabes@freenet.de> wrote:

>>The link doesn't work.

> It's 2025 already.  This works for me:

> http://home.chiemgau-net.de/ausserstorfer/Temp/2025-05-26/Skript.pdf

Thanks, Theo. I will give it later another place on my web site.

It is to understand, that this is a working process. This means that it
may and may not include mistakes and errors. It is written down by
something who wants to know the stuff in an logical order what he was also
missing in the past.

The first I will explore will be the PC (R15). I want to know the
structures of programs at the beginning. So the first command will be
MOV here. (On Mega65 it would be JMP I think).

It may be that I will include the Mega65 besides the ARM, too, because
you can learn a lot by comparing things.

A.

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

[toc] | [prev] | [next] | [standalone]


#6517

FromAlexander Ausserstorfer <bavariasound@chiemgau-net.de>
Date2025-06-14 17:58 +0200
Message-ID<5c2cea6fccbavariasound@chiemgau-net.de>
In reply to#6515
In article <5c2adc4465bavariasound@chiemgau-net.de>,
   Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote:
> In article <iKm*CnCeA@news.chiark.greenend.org.uk>,
>    Theo <theom+news@chiark.greenend.org.uk> wrote:
>> Sebastian Barthel <naitsabes@freenet.de> wrote:

>>> The link doesn't work.

>> It's 2025 already.  This works for me:

>> http://home.chiemgau-net.de/ausserstorfer/Temp/2025-05-26/Skript.pdf

> Thanks, Theo. I will give it later another place on my web site.

I put it now here:

http://home.chiemgau-net.de/ausserstorfer/Computer/Kurs.pdf (27 kB)

> It is to understand, that this is a working process. This means that it
> may and may not include mistakes and errors. It is written down by
> something who wants to know the stuff in an logical order what he was also
> missing in the past.

> The first I will explore will be the PC (R15). I want to know the
> structures of programs at the beginning. So the first command will be
> MOV here. (On Mega65 it would be JMP I think).

No, before all I begin now with the memory. This will become a huge
part.

It is a living process. It should be logical and not an enumeration of
commands like I found in many books.

I found something of the memory in the Programmer's Reference Manuals.
Are there other sources as well? Is there a program with which I can see
the memory of any RISC OS machine? StrongEd can only display files,
can't it?

A.

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

[toc] | [prev] | [next] | [standalone]


#6518

FromMartin <News03@avisoft.f9.co.uk>
Date2025-06-14 17:54 +0100
Message-ID<5c2cef85bdNews03@avisoft.f9.co.uk>
In reply to#6517
In article <5c2cea6fccbavariasound@chiemgau-net.de>,
   Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote:
> Is there a program with which I can see the memory of any RISC OS
> machine? 

There are commands *Memory, *MemoryA, and *MemoryI to display (and
even modify) memory in different formats.

> StrongEd can only display files, can't it?

No - it can also display memory. 
See Menu -> Create File -> Grab memory.  
Different named areas, and in different formats.

-- 
Martin Avison 
Note that unfortunately this email address will become invalid
without notice if (when) any spam is received. 

[toc] | [prev] | [next] | [standalone]


#6519

FromAlexander Ausserstorfer <bavariasound@chiemgau-net.de>
Date2025-06-19 06:31 +0200
Message-ID<5c2f3eb0a5bavariasound@chiemgau-net.de>
In reply to#6518
In article <5c2cef85bdNews03@avisoft.f9.co.uk>,
   Martin <News03@avisoft.f9.co.uk> wrote:
> In article <5c2cea6fccbavariasound@chiemgau-net.de>,
>    Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote:
>> Is there a program with which I can see the memory of any RISC OS
>> machine?

> There are commands *Memory, *MemoryA, and *MemoryI to display (and
> even modify) memory in different formats.

Thanks.

>> StrongEd can only display files, can't it?

> No - it can also display memory.
> See Menu -> Create File -> Grab memory.
> Different named areas, and in different formats.

I couldn't find the menu entry. When I click on iconbar -> !StrongEd ->
Menu -> Create -> Dump StrongEd offers me a window with name Grab in the
window title bar. Did you mean that?

In !Zap I can grab a are of memory as I wish.

A.

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

[toc] | [prev] | [next] | [standalone]


#6521

FromMartin <News03@avisoft.f9.co.uk>
Date2025-06-19 10:09 +0100
Message-ID<5c2f581e37News03@avisoft.f9.co.uk>
In reply to#6519
In article <5c2f3eb0a5bavariasound@chiemgau-net.de>,
   Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote:
> In article <5c2cef85bdNews03@avisoft.f9.co.uk>,
>    Martin <News03@avisoft.f9.co.uk> wrote:
> > In article <5c2cea6fccbavariasound@chiemgau-net.de>,
> >    Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote:
> >> Is there a program with which I can see the memory of any RISC OS
> >> machine?

> > There are commands *Memory, *MemoryA, and *MemoryI to display (and
> > even modify) memory in different formats.

> Thanks.

> >> StrongEd can only display files, can't it?

> > No - it can also display memory.
> > See Menu -> Create File -> Grab memory.
> > Different named areas, and in different formats.

> I couldn't find the menu entry. 

Which version of StrongEd are you using?
Here I am using v4.70a17 (31 May 2025)

> When I click on iconbar ->
> !StrongEd -> Menu -> Create -> Dump StrongEd offers me a window
> with name Grab in the window title bar. Did you mean that?

If the Grab Memory window shows menu icons for ROM Module, RAM Module,
Application, ROM Workspace, RAM Workspace and Dynamic Area, then
buttons for Zero Page, Empty Text, CMOS RAM, Close, then yes. If you
are using another version of SE it may be slightly different.

> In !Zap I can grab a are of memory as I wish.

I don't think there is an equivalent of !Zap -> Create -> Read Memory
to specify addresses to dump, but that only reads from the specified
task - which is what selecting an application in SE does for the whole
application slot.

-- 
Martin Avison 
Note that unfortunately this email address will become invalid
without notice if (when) any spam is received. 

[toc] | [prev] | [next] | [standalone]


#6523

FromJean-Michel <jmc.bruck@orange.fr>
Date2025-06-19 11:32 +0200
Message-ID<bc355a2f5c.jmb@jmc.bruck.orange.fr>
In reply to#6521
In message <5c2f581e37News03@avisoft.f9.co.uk>
          Martin <News03@avisoft.f9.co.uk> wrote:

> In article <5c2f3eb0a5bavariasound@chiemgau-net.de>,
>    Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote:
>> In article <5c2cef85bdNews03@avisoft.f9.co.uk>,
>>    Martin <News03@avisoft.f9.co.uk> wrote:
>>> In article <5c2cea6fccbavariasound@chiemgau-net.de>,
>>>    Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote:
>>>> Is there a program with which I can see the memory of any RISC OS
>>>> machine?

>>> There are commands *Memory, *MemoryA, and *MemoryI to display (and
>>> even modify) memory in different formats.

>> Thanks.

>>>> StrongEd can only display files, can't it?

>>> No - it can also display memory.
>>> See Menu -> Create File -> Grab memory.
>>> Different named areas, and in different formats.

>> I couldn't find the menu entry.

> Which version of StrongEd are you using?
> Here I am using v4.70a17 (31 May 2025)

>> When I click on iconbar ->
>> !StrongEd -> Menu -> Create -> Dump StrongEd offers me a window
>> with name Grab in the window title bar. Did you mean that?

> If the Grab Memory window shows menu icons for ROM Module, RAM Module,
> Application, ROM Workspace, RAM Workspace and Dynamic Area, then
> buttons for Zero Page, Empty Text, CMOS RAM, Close, then yes. If you
> are using another version of SE it may be slightly different.

>> In !Zap I can grab a are of memory as I wish.

> I don't think there is an equivalent of !Zap -> Create -> Read Memory
> to specify addresses to dump, but that only reads from the specified
> task - which is what selecting an application in SE does for the whole
> application slot.

FIY, Stronged GrabMemory: Application drop -down menu, allows you to see 
that all applications start at 0x8000


-- 
Jean-Michel

[toc] | [prev] | [next] | [standalone]


#6555

FromAlexander Ausserstorfer <bavariasound@chiemgau-net.de>
Date2025-11-02 16:42 +0200
Message-ID<5c75805cc6bavariasound@chiemgau-net.de>
In reply to#6517
In article <5c2cea6fccbavariasound@chiemgau-net.de>,
   Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote:

> I put it now here:

> http://home.chiemgau-net.de/ausserstorfer/Computer/Kurs.pdf (27 kB)

You'll find an update now here:

http://home.chiemgau-net.de/ausserstorfer/Temp/2025-11-02/2025-08-31_PHB.pdf

(around 4 megabytes now).

I had problems with my Internet connection why I was not able to go
online for a few months now.

I discovered some interesting points. I will write about later here.

A.

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

[toc] | [prev] | [next] | [standalone]


#6556

FromMartin <News03@avisoft.f9.co.uk>
Date2025-11-02 17:01 +0000
Message-ID<5c758d12a5News03@avisoft.f9.co.uk>
In reply to#6555
In article <5c75805cc6bavariasound@chiemgau-net.de>,
   Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote:

> You'll find an update now here:

> http://home.chiemgau-net.de/ausserstorfer/Temp/2025-11-02/2025-08-31_PHB.pdf

> (around 4 megabytes now).

I have had a very quick look at your pdf, but I have not translated
it.  However, I have noticed some possible confusion between the ! and
? indirection BASIC operators...

In Listing 2.2.1 you have 4 statements, each of which write 4 bytes to
memory - it actually writes 7 bytes! It would be better as
    10 ?&9000=&0E
    20 ?&9001=&F0
    30 ?&9002=&A0
    40 ?&9003=&E1
which only writes 4 bytes.

But it is even easier to just write 
    10  !&9000=&E1A0F00E
which writes 4 bytes in one go.

Listing 2.2.0 could be similarly simplified to
    10 READ B%
    20 !&9000 = B%
    30 DATA &E1A0F00E

Another way to display memory from within BASIC is my Reporter, as you
can use commands like
    *ReportDump ~(&9000) (4)
and many other things (see www.avisoft.f9.co.uk).

Martin

-- 
Martin Avison 
Note that unfortunately this email address will become invalid
without notice if (when) any spam is received. 

[toc] | [prev] | [next] | [standalone]


#6557

FromAlexander Ausserstorfer <bavariasound@chiemgau-net.de>
Date2025-11-15 14:55 +0200
Message-ID<5c7c2864b7bavariasound@chiemgau-net.de>
In reply to#6556
In article <5c758d12a5News03@avisoft.f9.co.uk>,
   Martin <News03@avisoft.f9.co.uk> wrote:
> In article <5c75805cc6bavariasound@chiemgau-net.de>,
>    Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote:

>> You'll find an update now here:

>> http://home.chiemgau-net.de/ausserstorfer/Temp/2025-11-02/2025-08-31_PHB.pdf

>> (around 4 megabytes now).

> I have had a very quick look at your pdf, but I have not translated
> it.  However, I have noticed some possible confusion between the ! and
> ? indirection BASIC operators...

Excuse me. I come from the Commodore 64 and do only know something about
the POKE and PEEK commands.

I don't understand the ! and ? commands. I found some PDFs online and
wonder because its about BBC BASIC but not for the Acorn Archimedes but
for a Z80 called Sinclair Spectrum and another for a Z88 system. So BBC
BASIC doesn't belong to RISC OS only?

? belongs to a byte ! belongs to a word.

With !(&9000) you can write into memory. But with the same command you
can read it!

I never have seen that before.

Try PRINT !&9000 for example

I never read about that in the GAG news for example. It is a shame.

I'm also looking for a memory map for RISC OS (I do know something about
the memory map of Commodore 64 like the commands POKE 53280,4 or 53281,0
which changes the colours of the screen) but nothing about the memory
map of RISC OS. Where can I find the adresses?

Thanks in advance,

A.

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

[toc] | [prev] | [next] | [standalone]


#6562

Fromdruck <news@druck.org.uk>
Date2025-11-17 19:08 +0000
Message-ID<10ffrrm$12gab$1@druck.eternal-september.org>
In reply to#6557
On 15/11/2025 12:55, Alexander Ausserstorfer wrote:
> Excuse me. I come from the Commodore 64 and do only know something about
> the POKE and PEEK commands.
> 
> I don't understand the ! and ? commands. I found some PDFs online and
> wonder because its about BBC BASIC but not for the Acorn Archimedes but
> for a Z80 called Sinclair Spectrum and another for a Z88 system. So BBC
> BASIC doesn't belong to RISC OS only?
> 
> ? belongs to a byte ! belongs to a word.
> 
> With !(&9000) you can write into memory. But with the same command you
> can read it!
> 
> I never have seen that before.

The '?' and '!' are not commands, but operators. They change the meaning 
of the following constant or variable to mean the byte or word at this 
address.

e.g.

!&9000 means the contents of the 4 bytes at address &9000, you can 
either read from it, or write to it.

The same with variables, if B%=&1234

?B%=99 set the value the byte at address &1234 to 99

There is also a syntax to write to bytes or words offset from the 
address using a constant or another variable.

B%?1 the byte at location &1235
B%!4 the word at location &1238

It's all in the BBC BASIC manual

---druck

[toc] | [prev] | [next] | [standalone]


#6558

FromAlexander Ausserstorfer <bavariasound@chiemgau-net.de>
Date2025-11-15 15:11 +0200
Message-ID<5c7c29dce9bavariasound@chiemgau-net.de>
In reply to#6555
In article <5c75805cc6bavariasound@chiemgau-net.de>,
   Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote:
> In article <5c2cea6fccbavariasound@chiemgau-net.de>,
>    Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote:

> I discovered some interesting points. I will write about later here.

What I don't understand ist that: Bruce Smith wrotes in his book, that
the command

MOV PC, R14

will stop your programme and jump back to RISC OS.

In machine code, it has the value &E1A0 E00F.

This is okey.

But when I use the Acorn Assembler (DDE) to translate this command (MOV
PC, R14) to machine code (&E1A0 E00F) the result is much bigger as 4
bytes! You will geht this here:

8000 : E1A00000 : .. á : MOV     R0,R0
8004 : E1A00000 : .. á : MOV     R0,R0
8008 : E1A00000 : .. á : MOV     R0,R0
800C : EB00001B : ...ë : BL      &00008080
8010 : EF000011 : ...ï : SWI     OS_Exit
8014 : 00000080 : €... : ANDEQ   R0,R0,R0,LSL #1
8018 : 00000004 : .... : ANDEQ   R0,R0,R4
801C : 00000000 : .... : ANDEQ   R0,R0,R0
8020 : 00000000 : .... : ANDEQ   R0,R0,R0
8024 : 00000000 : .... : ANDEQ   R0,R0,R0
8028 : 00008000 : .€.. : ANDEQ   R8,R0,R0
802C : 00000000 : .... : ANDEQ   R0,R0,R0
8030 : 00000020 :  ... : ANDEQ   R0,R0,R0,LSR #32
8034 : 00000000 : .... : ANDEQ   R0,R0,R0
8038 : 00000000 : .... : ANDEQ   R0,R0,R0
803C : 00000000 : .... : ANDEQ   R0,R0,R0
8040 : E1A00000 : .. á : MOV     R0,R0
8044 : E04EC00F : .ÀNà : SUB     R12,R14,PC
8048 : E08FC00C : .À*à : ADD     R12,PC,R12
804C : E99C000F : ..?é : LDMIB   R12,{R0-R3}
8050 : E24CC010 : .ÀLâ : SUB     R12,R12,#&10       ; =16
8054 : E59C2030 : 0 ?å : LDR     R2,[R12,#48]
8058 : E3120C01 : ...ã : TST     R2,#&0100          ; =256
805C : 159CC034 : 4À?. : LDRNE   R12,[R12,#52]
8060 : 008CC000 : .À.... : ADDEQ   R12,R12,R0
8064 : E08CC001 : .À...à : ADD     R12,R12,R1
8068 : E3A00000 : .. ã : MOV     R0,#0
806C : E3530000 : ..Sã : CMP     R3,#0
8070 : D1A0F00E : .ð Ñ : MOVLE   PC,R14
8074 : E48C0004 : .....ä : STR     R0,[R12],#4
8078 : E2533004 : .0Sâ : SUBS    R3,R3,#4
807C : EAFFFFFB : ûÿÿê : B       &00008070
8080 : E1A0F00E : .ð á : MOV     PC,R14

The file has a size of 132 bytes for just ONE command! At &8080 you'll
find the command MOV PC, R14. Why is this happen?

And if I use the GCC to convert the command MOV PC, R14 to machine code,
the result is not a file type of Absolute but of ELF and it has a file
size of huge blowy shit! 784 bytes for just ONE command! I don't
understand that.

It is also a shame that I had never read about that in the GAG News and
that the editor seems to have no interests in this aspects of RISC OS.
He doesn't answered to any of my latest emails but writes pages about
things which don't belongs RISC OS like PHP or creating web pages.

A.

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

[toc] | [prev] | [next] | [standalone]


#6559

FromHarriet Bazley <harriet@bazleyfamily.co.uk>
Date2025-11-15 19:46 +0000
Message-ID<050c4e7c5c.harriet@bazleyfamily.co.uk>
In reply to#6558
On 15 Nov 2025 as I do recall,
          Alexander Ausserstorfer  wrote:

> In article <5c75805cc6bavariasound@chiemgau-net.de>,
>    Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote:
> > In article <5c2cea6fccbavariasound@chiemgau-net.de>,
> >    Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote:
> 
> > I discovered some interesting points. I will write about later here.
> 
> What I don't understand ist that: Bruce Smith wrotes in his book, that
> the command
> 
> MOV PC, R14
> 
> will stop your programme and jump back to RISC OS.
> 
> In machine code, it has the value &E1A0 E00F.
> 
> This is okey.
> 
> But when I use the Acorn Assembler (DDE) to translate this command (MOV
> PC, R14) to machine code (&E1A0 E00F) the result is much bigger as 4
> bytes!

If you want literal machine code I think you need to use the
instructions in the built-in BASIC assembler (or just enter the bytes
into a blank file, but that's a bit masochistic).

If you use external tools you are probably going to get all sorts of
file headers and so on being added;  filetype Absolute is defined an "an
absolute application loaded at &8000" rather than just a chunk of
machine code bytes.  As I understand it you can't double-click on pure
machine code -- you need to call it manually from within some program
that is already running.  It is too low-level to be able to set up all
the environment needed for a RISC OS task to start.

It's a very long time since I did any low-level programming, I'm afraid,
but here's the BASIC assembler set-up I have saved from my A5000 days:

REM StrongED$mode = BasAsm
ON ERROR: ON ERROR OFF: PRINT REPORT$;" at line ";ERL:END
length%=100
DIM ourcode% length%
L%=ourcode%+length%
PROCassemble
PRINT " Length of code = ";P%-ourcode%
PRINT " Block allocated = ";length%
PRINT " Now calling code "
LOCAL ERROR
ON ERROR LOCAL END
CALL ourcode%
END


DEF PROCassemble
REM implement two passes and set up
REM values for OPT at the same time
REM first pass - enable only range check
REM i.e. OPT 8
REM second pass - enable error report,
REM range check and listing, i.e. OPT 11
FOR pass% = 8 TO 11 STEP 3
 REM set P% to start of our code
 REM on each pass
 P% = ourcode%
 REM now invoke the assembler
 [OPT     pass%
 ; set value of OPT as appropriate
 ; assembler code will go here
MOV      R15, R14          ;exit routine
 ]
REM we have now left the assembler
NEXT pass%
ENDPROC

DEF FNmessage(string$)
[OPT pass%
   SWI    "OS_WriteS"
   EQUB   10
   EQUB   13
   EQUS   string$
   EQUB   10
   EQUB   13
   EQUB   0
]
=0

You can save this out as a BASIC file and double-click on it and it will
assemble and run whatever instructions you have entered between the
square brackets (take care not to exceed 100 bytes without increasing
length%, which defines the amount of space being reserved inside BASIC's
workspace for the code to be put into!)

If you want to actually use such a routine within a parent BASIC program
you can save out the relevant block of memory as a file of type Data and
then load it back into a  suitably dimensioned block of memory and CALL
that address, but to be honest it's generally easier to assemble scraps
of machine code using the inbuilt assembler when the parent program is
first run, because that way you can use BASIC variables, poke in text
values from variables, and so on, e.g. FNmessage here will store
the content of a string variable and the instruction to print it out.

So 
 [OPT     pass%
FNmessage("Harriet")
 MOV      R15, R14          ;exit routine
 ]

will generate a scrap of code that simply prints the string "Harriet".

-- 
Harriet Bazley                     ==  Loyaulte me lie ==

Time flies like an arrow - fruit flies like a banana

[toc] | [prev] | [next] | [standalone]


#6563

FromAlexander Ausserstorfer <bavariasound@chiemgau-net.de>
Date2025-12-06 17:57 +0200
Message-ID<5c87099f9bbavariasound@chiemgau-net.de>
In reply to#6559
In article <050c4e7c5c.harriet@bazleyfamily.co.uk>,
   Harriet Bazley <harriet@bazleyfamily.co.uk> wrote:

[part snipped]

> So
>  [OPT     pass%
> FNmessage("Harriet")
>  MOV      R15, R14          ;exit routine
>  ]

> will generate a scrap of code that simply prints the string "Harriet".

Thank you! However, you can do this much easier. Just write the hex
values

01 00 00 EF 48 61 72 72 69 65 74 00 0E F0 A0 E1

into the memory and run it. It does the same as your example programme.

If you want to have it word aligned type

EF000001 72726148 00746569 E1A0F0E0

This is the representation in the dump mode of !StrongED, for example.

The most significant byte of a word is always on the left! That's may be
the point here.

A.

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

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.sys.acorn.programmer


csiph-web