MC68000/10/20/30/40/60/851 reassembler

   Author:       Tim Ruehsen, Ilkka Lehtoranta, Frank Wille, Nicolas Bastien
   Uploader:     frank phoenix owl de
   Type:         dev/asm
   Version:      2.10
   Architecture: ppc-morphos; ppc-amigaos; m68k-amigaos >= 2.0.4
   Date:         2023-12-06
   Readme:       http://aminet.net/dev/asm/ira.readme
   Downloads:    8728

=> http://aminet.net/dev/asm/ira.lha

When I was in need for a portable M68k reassembler I remembered Tim Ruehsen's

IRA source, and put some effort in it to make it portable to any architecture

and any compiler. Some code was taken from Ilkka Lehtoranta's MorphOS port

of IRA 1.05, who already cleaned the code from all SAS/C dependencies, but

the most effort was put into making the reassembler endian-independant (which

means it would even compile and work on x86 machines now!).

HISTORY

-- Modifications for V2.00 --

Bug fixes:

which is loaded to the base address register, and not an offset. This

caused some confusion when the binary's OFFSET is not 0.

one when running with -preproc over code which is not ended by an RTS or

similar.

New features:

addressing modes. There are more assemblers (including vasm 1.4 and PhxAss)

supporting it.

is written as an absolute label, without the base register name (as with

IRA V1.05). The default behaviour now is to write base-relative references

as "(label,An)".

valid when accessing bits 8-15 in memory (e.g. btst #14,DMACONR).

single address or a range of addresses which contain 32-bit pointers to

addresses from the reassembled binary. This directive is especially useful

in data sections of a raw binary, which has no relocation information.

IRA will create a label for all the pointers in that range.

area between and should not use base-relative addressing

modes (e.g. because the base register is used in another way here).

IRA will start this area with an "ENDB An", to disable basereg-mode, and

reenables base-relative mode with a BASEREG directive afterwards.

suffix and in indirect addressing modes. ".W" was mostly missing before.

been specified.

MC68881/MC68851, which is understood by more assemblers (e.g. vasm,

phxass, barfly, snma, etc.).

-- Modifications for V2.01 --

Bug fixes:

New features:

(and vasm-supported) " encoding, use the new -ESCCODES option.

-- Modifications for V2.02 --

Bug fixes:

32 to 128 bytes (as source and target file name buffer already were).

it should have been '32'.

SECSTRT_n-offset is unreliable when optimizing.

New features:

has disappeared. It is sufficient to define base-relative addressing by

a base-register and a base-address (e.g. -BASEREG=4,$12340).

-BASEREG option) defines an additional offset on the base-label (usually

32766).

this address is not referenced.

-- Modifications for V2.03 --

Bug fixes:

section boundaries. Otherwise IRA cannot detect the start of a new section

during source generation.

New features:

This overrides the automatic text recognition.

Syntax: "TEXT $ - $".

(or other offset-tables used to reference a program address).

Syntax: "JMP $ - $ [ at $]". may be B, W or L and

defines the width of the table entries (8, 16, 32 bit). The is

optional and same as , when missing. It defines the base address

where the table-offsets are added to.

-COMPAT= to allow multiple compatibility flags. Currently known:

b : Recognize immediate values of 8-15 for bit-instructions accessing

  memory (former -BITRANGE option).

i : Recognize immediate byte addressing modes with an MSB of 0xff. Some

  assemblers generated 0xffff instead of 0x00ff for #-1.

-- Modifications for V2.04 --

Bug fixes:

function tables did not work when a relative 16-bit one was found before.

the input file is a raw binary.

addressing modes.

New features:

directive).

section limits, and ignore this symbol.

referenced via SECTSTRT_n and a warning is printed (because the

instruction could be data, or the base register contains something

else at this point).

-- Modifications for V2.05 --

Bug fixes:

assigned value is not within the reassembled address range.

easily be supported at the moment, so IRA will just quit when it happens.

from the referring section in case both have the same address.

New features:

from taking any address in this region as a program pointer (which would

generate a label). Only works with binary input files!

-- Modifications for V2.06 --

Bug fixes:

makes it assemble (with vasm at least).

(e.g. use "label+2" instead of making a new label, which caused trouble).

code for a jump table (to avoid problems with "label1-label2+2").

-- Modifications for V2.07 --

Bug fixes:

much better now.

New features:

-- Modifications for V2.08 --

Bug fixes:

New features:

-- Modifications for V2.09 --

Bug fixes:

New features:

ira_config.doc).

and data in the comment field.

-- Modifications for V2.10 --

Bug fixes:

which extends into the following instruction, cannot be valid.

New features:

But cannot create labels for such references at this time.

INSTALLATION

Copy the binary for your architecture anywhere you want (e.g. C:) and rename

it into "ira".

ira_68k: IRA for AmigaOS2.x/3.x (680x0)

ira_os4: IRA for AmigaOS4.x (PPC)

ira_mos: IRA for MorphOS1.x/2.x (PPC)

SOURCE TEXT

Use "makefile" to compile the source with gcc on any architecture. It was

successfully tested on a Mac G4, Sun Sparcstation, an i386 system (all

running NetBSD kernels) and Win32 GNU.

Note: On BSD systems use GNU's make command ("gmake") and not the

  native one ("make").

USAGE

The original IRA was tuned for PhxAss, which might still work. The

recommended assembler is vasm/M68k V1.7 or greater though, which you

should call with the -no-opt option to avoid optimizations, for the

generation of an identical binary.

Other assemblers like DevPac, Barfly and SNMA can assemble IRA output

without error, but do not generate identical code. All of them convert

ADD/SUB/CMP/AND/etc. into their immediate form (ADDI/SUBI/CMPI/ANDI/etc.)

when possible, and DevPac additionally swaps registers in EXG.

Example: I'm using the following commands to reassemble AmigaBASIC and

to assemble an identical binary with vasm. The config file was manually

adjusted by me to reflect all valid code regions (create a config file

with -preproc first), then duplicated as NewAmigaBASIC.cnf. The diff test

reports no differences!

ira -a -compat=bi -config -keepzh AmigaBASIC

vasmm68k_mot -no-opt -Fhunkexe -nosym -o NewAmigaBASIC AmigaBASIC.asm

ira -a -compat=bi -config -keepzh NewAmigaBASIC

diff -s AmigaBASIC.asm NewAmigaBASIC.asm

The option -compat=bi is needed to allow bad btst instructions which

access a bit number > 7 in a byte (b) and to recognize immediate byte

addressing modes with an MSB of 0xff (i), which both appear frequently

in the program. The -keepzh option preserves empty sections, so that the

number of sections stays the same as before.

Refer to ira.doc for the original IRA V1.xx documentation.

Refer to ira2.doc for IRA V2.xx documentation.

Refer to ira_config.doc for a description of config directives.

Note that IRA is no longer Shareware, but Freeware! The initial author,

Tim Ruehsen, should not be contacted, as he left the Amiga and stopped

working on IRA many years ago.

For bug reports, suggestions, etc. contact Frank Wille (frank at phoenix.owl.de).

Contents of dev/asm/ira.lha

PERMISSION  UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP     NAME
---------- ----------- ------- ------- ------ ---------- ------------ ----------
[generic]                 5391   32477  16.6% -lh5- bd00 Aug 29  2021 ira/amiga_hunks.c
[generic]                 1767    4993  35.4% -lh5- 4799 Mar 15  2021 ira/amiga_hunks.h
[generic]                  242     401  60.3% -lh5- 9ccc Mar 21  2017 ira/atari.c
[generic]                  485    1120  43.3% -lh5- ab7b Mar 21  2017 ira/atari.h
[generic]                  685    1525  44.9% -lh5- 9631 Apr 23  2021 ira/binary.c
[generic]                  228     359  63.5% -lh5- fea1 Mar 21  2017 ira/binary.h
[generic]                 7734   47841  16.2% -lh5- 6b4a Mar 27  2022 ira/config.c
[generic]                  424    1037  40.9% -lh5- 630e Mar 21  2017 ira/config.h
[generic]                 6642   54269  12.2% -lh5- 2e45 Mar 15  2021 ira/constants.c
[generic]                  413     987  41.8% -lh5- 664a Mar 21  2017 ira/constants.h
[generic]                  239     389  61.4% -lh5- dd1f Mar 21  2017 ira/elf.c
[generic]                  621    1414  43.9% -lh5- 0a4c Mar 21  2017 ira/elf.h
[generic]                 4842   19716  24.6% -lh5- a9e1 Apr 27  2017 ira/init.c
[generic]                  340     607  56.0% -lh5- 6801 Mar 21  2017 ira/init.h
[generic]                26832  152979  17.5% -lh5- d55a Apr 23  2021 ira/ira.c
[generic]                 7330   18639  39.3% -lh5- 00f3 Apr  2  2009 ira/ira.doc
[generic]                 7579   31818  23.8% -lh5- 9c6e Apr  6  2020 ira/ira.h
[generic]                 5486   13068  42.0% -lh5- d418 Dec  6 18:08 ira/ira.readme
[generic]                 5158   13283  38.8% -lh5- 7739 Mar  6  2018 ira/ira2.doc
[generic]                 3884   17074  22.7% -lh5- 3056 Mar 12  2023 ira/ira_2.c
[generic]                  416     918  45.3% -lh5- 450d Jan 26  2020 ira/ira_2.h
[generic]                49261  110824  44.4% -lh5- 0164 Dec  4 16:47 ira/ira_68k
[generic]                 3299   12897  25.6% -lh5- 0cbf Mar  5  2018 ira/ira_config.doc
[generic]                60743  157600  38.5% -lh5- 05d6 Dec  4 16:46 ira/ira_mos
[generic]                63012  158064  39.9% -lh5- f5ec Dec  4 16:45 ira/ira_os4
[generic]                  581    1975  29.4% -lh5- 7fa1 Mar  6  2018 ira/make.rules
[generic]                  101     113  89.4% -lh5- 6ae5 May 31  2015 ira/Makefile
[generic]                  129     149  86.6% -lh5- 5f39 Jun  5  2009 ira/Makefile.mos
[generic]                  133     153  86.9% -lh5- 7a17 Aug 31  2013 ira/Makefile.os3
[generic]                  140     165  84.8% -lh5- f0d7 Jun  5  2009 ira/Makefile.os4
[generic]                  103     117  88.0% -lh5- 1319 Jan 20  2014 ira/Makefile.osx
[generic]                  239     336  71.1% -lh5- b04d Jul  2  2009 ira/Makefile.win32
[generic]                  549    1377  39.9% -lh5- 8fa3 Mar 13  2017 ira/megadrive.c
[generic]                  343     571  60.1% -lh5- 978a Mar 13  2017 ira/megadrive.h
[generic]                    0       0 ****** -lh0- 0000 Mar 29  2009 ira/obj/.dummy
[generic]                 1392    3365  41.4% -lh5- e0f0 Mar 13  2017 ira/opcode.c
[generic]                  294     498  59.0% -lh5- c1e3 Mar 13  2017 ira/opcode.h
[generic]                 1498    4750  31.5% -lh5- f278 Apr  2  2020 ira/supp.c
[generic]                  431    1032  41.8% -lh5- ddb6 Apr  2  2020 ira/supp.h
---------- ----------- ------- ------- ------ ---------- ------------ ----------
 Total        39 files  268986  868900  31.0%            Dec  7 03:34

Aminet © 1992-2023 Urban Müller and the Aminet team. Aminet contact address:

Proxy Information
Original URL
gemini://cugi.ie/aminet/1701920093.gmi
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
183.316236 milliseconds
Gemini-to-HTML Time
3.871816 milliseconds

This content has been proxied by September (ba2dc).