• Re: Learning ARM machine code

    From Alexander Ausserstorfer@bavariasound@chiemgau-net.de to comp.sys.acorn.programmer on Sun Nov 2 16:42:58 2025
    From Newsgroup: comp.sys.acorn.programmer

    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/
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Martin@News03@avisoft.f9.co.uk to comp.sys.acorn.programmer on Sun Nov 2 17:01:48 2025
    From Newsgroup: comp.sys.acorn.programmer

    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.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Alexander Ausserstorfer@bavariasound@chiemgau-net.de to comp.sys.acorn.programmer on Sat Nov 15 15:11:43 2025
    From Newsgroup: comp.sys.acorn.programmer

    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 : .. b : MOV R0,R0
    8004 : E1A00000 : .. b : MOV R0,R0
    8008 : E1A00000 : .. b : MOV R0,R0
    800C : EB00001B : ...o : BL &00008080
    8010 : EF000011 : ...N : SWI OS_Exit
    8014 : 00000080 : C... : 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 : .C.. : 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 : .. b : MOV R0,R0
    8044 : E04EC00F : .+Na : SUB R12,R14,PC
    8048 : E08FC00C : .+*a : ADD R12,PC,R12
    804C : E99C000F : ..?o : LDMIB R12,{R0-R3}
    8050 : E24CC010 : .+Lr : SUB R12,R12,#&10 ; =16
    8054 : E59C2030 : 0 ?o : LDR R2,[R12,#48]
    8058 : E3120C01 : ...p : TST R2,#&0100 ; =256
    805C : 159CC034 : 4+?. : LDRNE R12,[R12,#52]
    8060 : 008CC000 : .+.... : ADDEQ R12,R12,R0
    8064 : E08CC001 : .+...a : ADD R12,R12,R1
    8068 : E3A00000 : .. p : MOV R0,#0
    806C : E3530000 : ..Sp : CMP R3,#0
    8070 : D1A0F00E : .E - : MOVLE PC,R14
    8074 : E48C0004 : .....E : STR R0,[R12],#4
    8078 : E2533004 : .0Sr : SUBS R3,R3,#4
    807C : EAFFFFFB : + n : B &00008070
    8080 : E1A0F00E : .E b : 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/
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Alexander Ausserstorfer@bavariasound@chiemgau-net.de to comp.sys.acorn.programmer on Sat Nov 15 14:55:32 2025
    From Newsgroup: comp.sys.acorn.programmer

    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/
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Harriet Bazley@harriet@bazleyfamily.co.uk to comp.sys.acorn.programmer on Sat Nov 15 19:46:49 2025
    From Newsgroup: comp.sys.acorn.programmer

    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
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Steve Fryatt@news@stevefryatt.org.uk to comp.sys.acorn.programmer on Sat Nov 15 23:46:36 2025
    From Newsgroup: comp.sys.acorn.programmer

    On 15 Nov, Alexander Ausserstorfer wrote in message
    <5c7c29dce9bavariasound@chiemgau-net.de>:

    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.

    Because an ELF file isn't just the code itself: it's a structured file that
    can contain more data. So somewhere in there will be the 4 bytes of the MOV command, plus a header to tell the ELF loader where in memory to put that command when it loads the file. And other infrastructure needed to allow the file to do things like initialise separate blocks of memory, or load other chunks of assembled commands, linkable blocks like libraries, and so on.

    We moved on from doing *Save and *Load many years ago, because it's not that flexible and forces too many assumptions about the file contents to be made.

    See https://en.wikipedia.org/wiki/Executable_and_Linkable_Format for
    details.
    --
    Steve Fryatt - Leeds, England

    http://www.stevefryatt.org.uk/
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Theo@theom+news@chiark.greenend.org.uk to comp.sys.acorn.programmer on Sun Nov 16 11:59:40 2025
    From Newsgroup: comp.sys.acorn.programmer

    Steve Fryatt <news@stevefryatt.org.uk> wrote:
    On 15 Nov, Alexander Ausserstorfer wrote in message
    <5c7c29dce9bavariasound@chiemgau-net.de>:

    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.

    Because an ELF file isn't just the code itself: it's a structured file that can contain more data. So somewhere in there will be the 4 bytes of the MOV command, plus a header to tell the ELF loader where in memory to put that command when it loads the file. And other infrastructure needed to allow the file to do things like initialise separate blocks of memory, or load other chunks of assembled commands, linkable blocks like libraries, and so on.

    We moved on from doing *Save and *Load many years ago, because it's not that flexible and forces too many assumptions about the file contents to be made.

    See https://en.wikipedia.org/wiki/Executable_and_Linkable_Format for
    details.

    And the Absolute file generated by Acorn/ROOL's ObjAsm is an older format
    for the same idea - it's Acorn Image Format or AIF. AIF was something Acorn came up with in the 1980s, while ELF is a cross platform format devised
    in 1990s.

    This is a description of the format from 1993: https://www.chiark.greenend.org.uk/~theom/riscos/docs/CodeStds/AIF-1993.txt

    but it's undergone many changes since then (notably for 32-bit support).
    The latest version is included with the ROOL DDE tools.

    Theo
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From druck@news@druck.org.uk to comp.sys.acorn.programmer on Mon Nov 17 19:08:38 2025
    From Newsgroup: comp.sys.acorn.programmer

    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
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Alexander Ausserstorfer@bavariasound@chiemgau-net.de to comp.sys.acorn.programmer on Sat Dec 6 18:10:22 2025
    From Newsgroup: comp.sys.acorn.programmer

    In article <mpro.t5skpi00iwsze149i.news@stevefryatt.org.uk>,
    Steve Fryatt <news@stevefryatt.org.uk> wrote:

    On 15 Nov, Alexander Ausserstorfer wrote in message
    <5c7c29dce9bavariasound@chiemgau-net.de>:

    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.

    Because an ELF file isn't just the code itself: it's a structured file
    that can contain more data. So somewhere in there will be the 4 bytes
    of the MOV command, plus a header to tell the ELF loader where in
    memory to put that command when it loads the file. And other
    infrastructure needed to allow the file to do things like initialise
    separate blocks of memory, or load other chunks of assembled commands, linkable blocks like libraries, and so on.

    We moved on from doing *Save and *Load many years ago, because it's
    not that flexible and forces too many assumptions about the file
    contents to be made.

    My idea was (or is) that an Assembler just converts the source code with mnemonics 1 : 1 into machine code - and nothing else! If you have a need
    for additional data and structures, you should be able to add it to your
    source code by your own.

    It shouldn't be added automatically by the Assembler because this is a
    bit of spoon-feeding (the German word here would be 'Bevormundung', I
    don't know the correct English expression). You are hide here something
    from the programmer. This is not a good way to learn! He should be able
    to know what he's doing!

    Unix, ugh!

    A.
    --
    http://home.chiemgau-net.de/ausserstorfer/
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Alexander Ausserstorfer@bavariasound@chiemgau-net.de to comp.sys.acorn.programmer on Sat Dec 6 17:57:40 2025
    From Newsgroup: comp.sys.acorn.programmer

    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/
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Martin@News04@avisoft.f9.co.uk to comp.sys.acorn.programmer on Sat Dec 6 18:15:24 2025
    From Newsgroup: comp.sys.acorn.programmer

    In article <5c87099f9bbavariasound@chiemgau-net.de>,
    Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote:
    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

    That to my mind is MUCH harder, and would give you maintenance
    nightmares, as it is impossible to read easily. The computer is MUCH
    better translating plain text into hex and binary then we are.

    I strongly suggest that is not the way to program these days.
    It was bad enough 50 years ago, when that was the only option, but
    certainly not now.
    --
    Martin Avison
    Note that unfortunately this email address will become invalid
    without notice if (when) any spam is received.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Harriet Bazley@harriet@bazleyfamily.co.uk to comp.sys.acorn.programmer on Sat Dec 6 20:06:37 2025
    From Newsgroup: comp.sys.acorn.programmer

    On 6 Dec 2025 as I do recall,
    Alexander Ausserstorfer wrote:

    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.

    I don't know aboput you, but most people find assembler op codes "much
    easier" than poking raw hexadecimal bytes into memory, even if not quite
    so easy to read as high-level languages!

    The point of that example was to demonstrate the use of the BASIC
    assembler, which allows you to use features like BASIC's string
    variables and functions while assembling your machine code, while still producing 'pure' machine code without the headers you were objecting to.

    Unfortunately it is not at all simple to use or set up (for example the requirement to do two passes with a different options value each time),
    which is why for all practical purposes I keep a file with an empty
    'shell' assembly routine in it and then copy that as a starting template
    any time I want to create a scrap of machine code to call from within
    BASIC.
    --
    Harriet Bazley == Loyaulte me lie ==

    Let a fool hold his tongue and he will pass for a sage.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Steve Fryatt@news@stevefryatt.org.uk to comp.sys.acorn.programmer on Sun Dec 7 12:18:38 2025
    From Newsgroup: comp.sys.acorn.programmer

    On 6 Dec, Alexander Ausserstorfer wrote in message
    <5c870ac95abavariasound@chiemgau-net.de>:

    It shouldn't be added automatically by the Assembler because this is a bit
    of spoon-feeding (the German word here would be 'Bevormundung', I don't
    know the correct English expression). You are hide here something from the programmer.

    That's not a good thing? As a programmer, the building of code is a
    repetitive, boring task that I want as automated as possible. Knowing what
    is happening is useful, agreed, but doing it by hand every time is
    definitely not useful!

    This is not a good way to learn! He should be able to know what he's
    doing!

    That's a different thing, though. And just because a 1:1 relationship is
    useful for learning, it doesn't follow that it's the way that development
    tools should do things.

    Unix, ugh!

    We may have to agree to differ!
    --
    Steve Fryatt - Leeds, England

    http://www.stevefryatt.org.uk/
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Alexander Ausserstorfer@bavariasound@chiemgau-net.de to comp.sys.acorn.programmer on Sun Dec 7 16:25:35 2025
    From Newsgroup: comp.sys.acorn.programmer

    In article <5c87163b82News04@avisoft.f9.co.uk>,
    Martin <News04@avisoft.f9.co.uk> wrote:
    In article <5c87099f9bbavariasound@chiemgau-net.de>,
    Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote:
    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

    That to my mind is MUCH harder, and would give you maintenance
    nightmares, as it is impossible to read easily. The computer is MUCH
    better translating plain text into hex and binary then we are.

    I strongly suggest that is not the way to program these days.
    It was bad enough 50 years ago, when that was the only option, but
    certainly not now.

    I don't understand that. The values are much more clear to me. Without I couldn't understand how computers are working.

    A.
    --
    http://home.chiemgau-net.de/ausserstorfer/
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Martin@News04@avisoft.f9.co.uk to comp.sys.acorn.programmer on Sun Dec 7 15:57:46 2025
    From Newsgroup: comp.sys.acorn.programmer

    In article <5c87850775bavariasound@chiemgau-net.de>,
    Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote:
    In article <5c87163b82News04@avisoft.f9.co.uk>,
    Martin <News04@avisoft.f9.co.uk> wrote:
    In article <5c87099f9bbavariasound@chiemgau-net.de>,
    Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote:
    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

    That to my mind is MUCH harder, and would give you maintenance
    nightmares, as it is impossible to read easily. The computer is
    MUCH better translating plain text into hex and binary then we
    are.

    I strongly suggest that is not the way to program these days. It
    was bad enough 50 years ago, when that was the only option, but
    certainly not now.

    I don't understand that. The values are much more clear to me.
    Without I couldn't understand how computers are working.

    Good luck in understanding it in a year ... or two ...or many more.
    Hex code I would not even try, stopping and improvment or development.

    As Steve said, we may have to agree to differ!
    --
    Martin Avison
    Note that unfortunately this email address will become invalid
    without notice if (when) any spam is received.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Jean-Michel@jmc.bruck@orange.fr to comp.sys.acorn.programmer on Mon Dec 8 10:23:31 2025
    From Newsgroup: comp.sys.acorn.programmer

    In message <5c87163b82News04@avisoft.f9.co.uk>
    Martin <News04@avisoft.f9.co.uk> wrote:

    In article <5c87099f9bbavariasound@chiemgau-net.de>,
    Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote:
    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

    That to my mind is MUCH harder, and would give you maintenance
    nightmares, as it is impossible to read easily. The computer is MUCH
    better translating plain text into hex and binary then we are.

    I strongly suggest that is not the way to program these days.
    It was bad enough 50 years ago, when that was the only option, but
    certainly not now.

    50 years ago we entered codes with switches then punched cards. The
    assembler was a big step forward
    --
    Jean-Michel
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From druck@news@druck.org.uk to comp.sys.acorn.programmer on Tue Dec 9 08:21:25 2025
    From Newsgroup: comp.sys.acorn.programmer

    On 06/12/2025 15:57, Alexander Ausserstorfer wrote:
    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.

    I'm surprised you haven't gone for the even easier option of toggling it
    in on the front panel switches, like a real programmer.

    ---druck
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Martin@News04@avisoft.f9.co.uk to comp.sys.acorn.programmer on Tue Dec 9 09:48:59 2025
    From Newsgroup: comp.sys.acorn.programmer

    In article <10h8m65$mhgq$1@druck.eternal-september.org>,
    druck <news@druck.org.uk> wrote:
    On 06/12/2025 15:57, Alexander Ausserstorfer wrote:
    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.

    I'm surprised you haven't gone for the even easier option of
    toggling it in on the front panel switches, like a real programmer.

    I certainly remember a real programmer setting lots of switches on the
    front of an enormous mainframe so it did what he wanted.

    But a real old programmer needed a pair of pliers to extract and
    insert hundreds of tangled patch leads in a patch board over a meter
    square!
    --
    Martin Avison
    Note that unfortunately this email address will become invalid
    without notice if (when) any spam is received.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Richard Ashbery@basura@invalid.addr.uk to comp.sys.acorn.programmer on Tue Dec 9 10:54:01 2025
    From Newsgroup: comp.sys.acorn.programmer

    In article <10h8m65$mhgq$1@druck.eternal-september.org>, druck <news@druck.org.uk> wrote:
    On 06/12/2025 15:57, Alexander Ausserstorfer wrote:
    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.

    I'm surprised you haven't gone for the even easier option of
    toggling it in on the front panel switches, like a real programmer.

    LOL

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Alexander Ausserstorfer@bavariasound@chiemgau-net.de to comp.sys.acorn.programmer on Sun Dec 21 17:13:11 2025
    From Newsgroup: comp.sys.acorn.programmer

    In article <5c878d77feNews04@avisoft.f9.co.uk>,
    Martin <News04@avisoft.f9.co.uk> wrote:
    In article <5c87850775bavariasound@chiemgau-net.de>,
    Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote:
    In article <5c87163b82News04@avisoft.f9.co.uk>,
    Martin <News04@avisoft.f9.co.uk> wrote:
    In article <5c87099f9bbavariasound@chiemgau-net.de>,
    Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote:
    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

    That to my mind is MUCH harder, and would give you maintenance
    nightmares, as it is impossible to read easily. The computer is
    MUCH better translating plain text into hex and binary then we
    are.

    I strongly suggest that is not the way to program these days. It
    was bad enough 50 years ago, when that was the only option, but
    certainly not now.

    I don't understand that. The values are much more clear to me.
    Without I couldn't understand how computers are working.

    Good luck in understanding it in a year ... or two ...or many more.
    Hex code I would not even try, stopping and improvment or development.

    As Steve said, we may have to agree to differ!

    May it be. For me, machine code is much more easy to understand. Because
    you don't need a compiler it means that there is nothing between you and
    the machine.

    You have to know something like a command of ARM (here 32 bit) is 32 bit
    wide (or 4 bytes what means 8 places in hex). The command beginns with
    the most significant byte why all four bytes has to be read reversed in
    byte oder. This makes thinks a bit more complicate because in memory you
    start with byte four and go back to byte one for each command.

    The example was:

    EF000001 72726148 00746569 E1A0F0E0

    In memory this is written in byte order, however:

    (Order counted here in decimal):

    1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16.

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

    EF is the command for jumping to a routine of the OS. You're calling
    this SWI. Learning SWI or EF doesn't matter. Both sais nothing so you
    have to learn and to know in any way what it means.

    000001 is the number of the routine (or SWI). EF is shorter as SWI and
    1 is much shorter as this long string "OS_WriteS". With the number, you
    will get more easy the idea of the table of routines EF links to.

    When you read the Programmers Reference Manuals about subroutine 1
    (or OS_WriteS) you'll learn that this routine uses the next bytes to
    print them as ASCII characters on the screen. The bytes have to be ASCII encoded and the routine ends by zero, so the bytes 5 up to 11 have to be interpreted as ASCII code.

    5. 48 = "H"

    6. 61 = "a"

    7. 72 = "r"

    8. 72 = "r"

    9. 69 = "i"

    10. 65 = "e"

    11. 74 = "t"

    Byte 12. has the value 00. It stops the subroutine 1.

    E1 A0 F0 0E writes the value from register &E (LR or fourteen) back to
    register &F (PC or fiveteen) what means that it gives the controll back
    to the OS. Because &F is the Programm Counter. It says to the CPU which
    command from which position in memory it should take next.

    We had one and a half year of programming C in the school but this way
    we learnt nothing. It is too abstract. You won't understand how
    computers are working and you don't understand what you are doing.
    Everything is hidden before you. You are stuck to the compilers. This is
    why I started learning ARM machine code.

    A.
    --
    http://home.chiemgau-net.de/ausserstorfer/
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From druck@news@druck.org.uk to comp.sys.acorn.programmer on Mon Dec 22 20:02:23 2025
    From Newsgroup: comp.sys.acorn.programmer

    On 21/12/2025 15:13, Alexander Ausserstorfer wrote:
    May it be. For me, machine code is much more easy to understand. Because
    you don't need a compiler it means that there is nothing between you and
    the machine.

    This topic was nothing to do with compilers, you responded to an ARM
    assembler example with idiotic comments that it was easier to program
    machine code in hex.

    You either need to switch to sniffing lead free solder, or require a
    quick tap to the temple with a wire wrap tool.

    Now stop wasting everyone's time with this nonsense.

    ---druck
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Paul Sprangers@Paul@sprie.nl to comp.sys.acorn.programmer on Mon Dec 22 23:32:38 2025
    From Newsgroup: comp.sys.acorn.programmer

    In article <10ic84f$3on78$1@druck.eternal-september.org>,
    druck <news@druck.org.uk> wrote:

    Now stop wasting everyone's time with this nonsense.

    Now, now... Alex didn't waste my time. Although I will never touch machine code, it was pretty amusing to read that someone is so familiar with it.

    Paul
    --
    https://riscos.sprie.nl
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Alexander Ausserstorfer@bavariasound@chiemgau-net.de to comp.sys.acorn.programmer on Tue Jan 6 14:42:37 2026
    From Newsgroup: comp.sys.acorn.programmer

    In article <5c8f6b2891Paul@sprie.nl>,
    Paul Sprangers <Paul@sprie.nl> wrote:
    In article <10ic84f$3on78$1@druck.eternal-september.org>,
    druck <news@druck.org.uk> wrote:

    Now stop wasting everyone's time with this nonsense.

    Now, now... Alex didn't waste my time. Although I will never touch machine code, it was pretty amusing to read that someone is so familiar with it.

    I just try to understand and to learn. How can I do or learn coding when
    I even don't understand any of the machine code, means _both_ sides of a compiler (or assembler)? I don't know what the program (compiler) is
    doing. I don't say you should do it always like that. But you should be
    able to do it! Without this knowledge, you aren't good. When you compare
    the code (source) before the compiler and behind the compiler (machine
    code), you'll learn and uncover a lot!

    A.
    --
    http://home.chiemgau-net.de/ausserstorfer/
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From anonymouse@na@ignoreme.com to comp.sys.acorn.programmer on Tue Jan 6 15:02:30 2026
    From Newsgroup: comp.sys.acorn.programmer

    On Tue, 06 Jan 2026 14:42:37 +0200, Alexander Ausserstorfer wrote:

    In article <5c8f6b2891Paul@sprie.nl>,
    Paul Sprangers <Paul@sprie.nl> wrote:
    In article <10ic84f$3on78$1@druck.eternal-september.org>,
    druck <news@druck.org.uk> wrote:

    Now stop wasting everyone's time with this nonsense.

    Now, now... Alex didn't waste my time. Although I will never touch
    machine code, it was pretty amusing to read that someone is so familiar
    with it.

    I just try to understand and to learn. How can I do or learn coding when
    I even don't understand any of the machine code, means _both_ sides of a compiler (or assembler)? I don't know what the program (compiler) is
    doing. I don't say you should do it always like that. But you should be
    able to do it! Without this knowledge, you aren't good. When you compare
    the code (source) before the compiler and behind the compiler (machine
    code), you'll learn and uncover a lot!

    A.

    Have a free book:

    https://archive.org/details/arm-archimedes-assembly-language-the-complete- programming-course-se-covers-risc-os
    --- Synchronet 3.21a-Linux NewsLink 1.2