• examples of arm assem.

    From Hul Tytus@21:1/5 to All on Sat May 8 19:28:39 2021
    Anyone know where on the internet files of programs, or portions
    of such, written an Arm assembley can be found? I'm in need
    of examples of arm assembly to serve as test code for a just
    written assembler.

    Hul

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Theo@21:1/5 to Hul Tytus on Thu May 13 14:28:24 2021
    Hul Tytus <ht@panix.com> wrote:

    Anyone know where on the internet files of programs, or portions
    of such, written an Arm assembley can be found? I'm in need
    of examples of arm assembly to serve as test code for a just
    written assembler.

    ARM has at least 4 instruction sets:

    1. The classic 32-bit ISA (32-bit instructions operating on 32 bit data)
    2. Thumb compressed 16-bit instructions (operating on 32 bit data)
    3. Thumb-2 compressed 16-bit instructions
    (not strictly a separate ISA but a way to mix #1 and #2 in a single
    instruction stream)
    4. AArch64 32-bit wide instructions operating on 64-bit data
    (completely different from all the above)

    There are then classic ARM 32-bit mnemonics, Thumb mnemonics and UAL
    'unified assembly language' intend to cover both with one syntax.

    Plus armasm and gas have different ways of writing assembly code.


    Choose your poison...

    Theo

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From boB@21:1/5 to theom+news@chiark.greenend.org.uk on Thu May 13 11:50:55 2021
    On 13 May 2021 14:28:24 +0100 (BST), Theo
    <theom+news@chiark.greenend.org.uk> wrote:

    Hul Tytus <ht@panix.com> wrote:

    Anyone know where on the internet files of programs, or portions
    of such, written an Arm assembley can be found? I'm in need
    of examples of arm assembly to serve as test code for a just
    written assembler.

    ARM has at least 4 instruction sets:

    1. The classic 32-bit ISA (32-bit instructions operating on 32 bit data)
    2. Thumb compressed 16-bit instructions (operating on 32 bit data)
    3. Thumb-2 compressed 16-bit instructions
    (not strictly a separate ISA but a way to mix #1 and #2 in a single >instruction stream)
    4. AArch64 32-bit wide instructions operating on 64-bit data
    (completely different from all the above)

    There are then classic ARM 32-bit mnemonics, Thumb mnemonics and UAL
    'unified assembly language' intend to cover both with one syntax.

    Plus armasm and gas have different ways of writing assembly code.


    Choose your poison...

    Theo


    Good point about the different instruction sets !

    I just use the regular Cortex M3 M4 and old non Cortex M versions
    myself.

    I get comfused on the actual "versions" or ARM code though...

    I used the older NXP/Philips parts with no Cortex M, the LPC2368
    series. Not sure if that is V4 or V7 ? Or something else ?

    boB

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Don Y@21:1/5 to Theo on Thu May 13 11:54:45 2021
    On 5/13/2021 6:28 AM, Theo wrote:
    Hul Tytus <ht@panix.com> wrote:

    Anyone know where on the internet files of programs, or portions
    of such, written an Arm assembley can be found? I'm in need
    of examples of arm assembly to serve as test code for a just
    written assembler.

    ARM has at least 4 instruction sets:

    1. The classic 32-bit ISA (32-bit instructions operating on 32 bit data)
    2. Thumb compressed 16-bit instructions (operating on 32 bit data)
    3. Thumb-2 compressed 16-bit instructions
    (not strictly a separate ISA but a way to mix #1 and #2 in a single instruction stream)
    4. AArch64 32-bit wide instructions operating on 64-bit data
    (completely different from all the above)

    There are then classic ARM 32-bit mnemonics, Thumb mnemonics and UAL
    'unified assembly language' intend to cover both with one syntax.

    Plus armasm and gas have different ways of writing assembly code.

    Choose your poison...

    It's unclear whether his tool targets one dialect, all, or can be
    commanded (command line switch) to address a specific one.

    One assumes that having the knowledge to craft such a tool would
    imply knowledge of the problem he's solving! (?)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hul Tytus@21:1/5 to boB on Thu May 13 22:37:46 2021
    Bob - I'm not too sure either. I'll probably find out though.
    The version 7 arckitecture reference is the current source.

    Hul

    boB <boB@k7iq.com> wrote:
    On 13 May 2021 14:28:24 +0100 (BST), Theo
    <theom+news@chiark.greenend.org.uk> wrote:

    Hul Tytus <ht@panix.com> wrote:

    Anyone know where on the internet files of programs, or portions
    of such, written an Arm assembley can be found? I'm in need
    of examples of arm assembly to serve as test code for a just
    written assembler.

    ARM has at least 4 instruction sets:

    1. The classic 32-bit ISA (32-bit instructions operating on 32 bit data)
    2. Thumb compressed 16-bit instructions (operating on 32 bit data)
    3. Thumb-2 compressed 16-bit instructions
    (not strictly a separate ISA but a way to mix #1 and #2 in a single >instruction stream)
    4. AArch64 32-bit wide instructions operating on 64-bit data
    (completely different from all the above)

    There are then classic ARM 32-bit mnemonics, Thumb mnemonics and UAL >'unified assembly language' intend to cover both with one syntax.

    Plus armasm and gas have different ways of writing assembly code.


    Choose your poison...

    Theo


    Good point about the different instruction sets !

    I just use the regular Cortex M3 M4 and old non Cortex M versions
    myself.

    I get comfused on the actual "versions" or ARM code though...

    I used the older NXP/Philips parts with no Cortex M, the LPC2368
    series. Not sure if that is V4 or V7 ? Or something else ?

    boB

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hul Tytus@21:1/5 to Don Y on Thu May 13 22:45:32 2021
    Don, the objective is a small assembler for in-house use and
    to be included with some equipment with arm processors. Some
    list files for checking the immediate and branching calculations
    and placements would be handy.

    Hul


    Don Y <blockedofcourse@foo.invalid> wrote:
    On 5/13/2021 6:28 AM, Theo wrote:
    Hul Tytus <ht@panix.com> wrote:

    Anyone know where on the internet files of programs, or portions
    of such, written an Arm assembley can be found? I'm in need
    of examples of arm assembly to serve as test code for a just
    written assembler.

    ARM has at least 4 instruction sets:

    1. The classic 32-bit ISA (32-bit instructions operating on 32 bit data)
    2. Thumb compressed 16-bit instructions (operating on 32 bit data)
    3. Thumb-2 compressed 16-bit instructions
    (not strictly a separate ISA but a way to mix #1 and #2 in a single instruction stream)
    4. AArch64 32-bit wide instructions operating on 64-bit data
    (completely different from all the above)

    There are then classic ARM 32-bit mnemonics, Thumb mnemonics and UAL 'unified assembly language' intend to cover both with one syntax.

    Plus armasm and gas have different ways of writing assembly code.

    Choose your poison...

    It's unclear whether his tool targets one dialect, all, or can be
    commanded (command line switch) to address a specific one.

    One assumes that having the knowledge to craft such a tool would
    imply knowledge of the problem he's solving! (?)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Don Y@21:1/5 to Hul Tytus on Thu May 13 16:55:23 2021
    On 5/13/2021 3:45 PM, Hul Tytus wrote:
    Don, the objective is a small assembler for in-house use and
    to be included with some equipment with arm processors. Some

    *Not* "self-hosting" but, rather, just to avoid the "mess" of
    installing a UN*X-ish environment on <whatever> platform your
    folks develop? Esp if you wanted to allow customers that
    capability?

    list files for checking the immediate and branching calculations
    and placements would be handy.

    So, you don't just want "sample sources" but, rather, sample
    *compiled* (assembled) sources -- as a check for your code generation?

    Do you have some other assembler on-hand (gas, gcc) to produce those?

    [I'm assuming you are generating "absolute" objects (not relocatable
    as that would further complicate such an analysis) so you'd also need
    to link/load the objects built with gas, etc.?]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Theo@21:1/5 to Hul Tytus on Fri May 14 10:49:44 2021
    Hul Tytus <ht@panix.com> wrote:
    Don, the objective is a small assembler for in-house use and
    to be included with some equipment with arm processors. Some
    list files for checking the immediate and branching calculations
    and placements would be handy.

    You didn't really clarify your requirements, but I'll point you at one big 'classic' 32-bit ARM codebase:

    https://www.riscosopen.org/

    specifically
    https://gitlab.riscosopen.org/RiscOS/Sources

    This is targeting the assembly format used by armasm (using an older fork
    of that called objasm). Newer parts are in C but you can find lots of
    assembly in the 's' folders.

    There's no Thumb and little VFP or NEON, but some FPA (the original 1980s
    ARM FPU). There's substantial use of macros as well.

    Theo

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hul Tytus@21:1/5 to Theo on Fri May 14 13:26:18 2021
    Thanks Theo. The thumb (1 and/or 2) codes are needed though.

    Hul

    Theo <theom+news@chiark.greenend.org.uk> wrote:
    Hul Tytus <ht@panix.com> wrote:
    Don, the objective is a small assembler for in-house use and
    to be included with some equipment with arm processors. Some
    list files for checking the immediate and branching calculations
    and placements would be handy.

    You didn't really clarify your requirements, but I'll point you at one big 'classic' 32-bit ARM codebase:

    https://www.riscosopen.org/

    specifically
    https://gitlab.riscosopen.org/RiscOS/Sources

    This is targeting the assembly format used by armasm (using an older fork
    of that called objasm). Newer parts are in C but you can find lots of assembly in the 's' folders.

    There's no Thumb and little VFP or NEON, but some FPA (the original 1980s
    ARM FPU). There's substantial use of macros as well.

    Theo

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jonathan Harston@21:1/5 to Hul Tytus on Tue May 25 17:29:16 2021
    On Thursday, 13 May 2021 at 02:18:08 UTC+1, Hul Tytus wrote:
    Anyone know where on the internet files of programs, or portions
    of such, written an Arm assembley can be found? I'm in need
    of examples of arm assembly to serve as test code for a just
    written assembler.

    Good luck. I'm in the middle of writing an ARM64 assembler, so
    am in the same position. Plus untangling the complexity of the
    ARM64 instruction architecture. ;)

    jgh

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hul Tytus@21:1/5 to Jonathan Harston on Mon May 31 20:10:26 2021
    Jonathon - I'm in the testing phase now but, thankfully, strictly 32 bit
    code. One trick I've found that's been helpful is "fasmarm", which is
    an offshoot of a 386 et.al. assembler. The name is, if memory serves,
    flat assembler or fasm. I've got it on a Microsoft xp msdos directory.
    The fasmarm handles the 64 bit codes which might make it useful for
    you.

    Hul

    Jonathan Harston <jgh@mdfs.net> wrote:
    On Thursday, 13 May 2021 at 02:18:08 UTC+1, Hul Tytus wrote:
    Anyone know where on the internet files of programs, or portions
    of such, written an Arm assembley can be found? I'm in need
    of examples of arm assembly to serve as test code for a just
    written assembler.

    Good luck. I'm in the middle of writing an ARM64 assembler, so
    am in the same position. Plus untangling the complexity of the
    ARM64 instruction architecture. ;)

    jgh

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)