[Oberon] ETHO's disassembler?

eas lab lab.eas at gmail.com
Mon Jun 23 01:26:17 CEST 2014


Some years ago, I discovered ETHO's <Decoder.Decode FileName>,
which amazingly, allowed disassembly of X86-code.
At that time, nobody else on the mailing-list seemed to be interested in
<looking down to byte level>.

It seems that the same facility exists for ETHO:ARM, and I want to test it.
Since it's designed to <decode> <ETHO>.Obj it expects the files to comply
with the format of <ETHO>.Obj.
However I was able to <decode> arbitrary X86 bytes by somehow patching
the <arbitrary X86-code bytes> to a template <ETHO>.Obj.

Obviously I made notes documenting my method. But now the main IDE
of N-O partitions seems OOO! The other IDE of N-O partitions fails to
mount the <NOdocumentation> partition under LNO.
But fortunately, linux does:
read the bytes of the partition <which won't mount under LNO> |
removing non-ascii-bytes |
wrapping the lines suitably |
select only lines containing "ecode" |
save it to a file.
[PS. this is a further typical task where functional-composition is good]

The file is interesting, but I can't see from the text fragments, exactly
what is my-notes OR original ETHO-documentation; eg. I see:...
     * Decoder.Mod - More robust against incorrect references (prk).
     * Decoder.Mod - Accept new object file tag and show flags (prk).
     * OPA.Mod, OPAData.Mod, OPA.Data, Decoder.Mod - MMX instruction set
     * Decoder.Mod - Installable disassembler (be).
     * Decoder.Mod - Fixed MOVSX and MOVZX (prk).
...
ARM.ARMCompiler.Mod, ARM.ARMDecoder.Mod, ARM.ARMBootLinker.Mod
END DecodeThis;    dest = POINTER TO TextDesc ! = in/out par.
 Examine some other 'small' : Decoder.Decode  FileDir.Obj ~ ==
 3. call PROCEDURE DecodeThis
       A: Use the Decoder tool to disassemble Native Oberon or Linux
       Native Oberon object files. Syntax: Decoder.Decode some.Obj
       opens a text viewer "Decoder.Dec" presenting the disassembled
--------------- end of file extract:-

Annoyingly !! I've forgotten where to patch-in the arbitrary bytes, so that
Decoder.Decode remains valid/syncronised.
I suspect the template was ETHO-code with only a main-block.
How would you try to do this ?

== Chris Glur.

PS. After writing this, to force myself to THINK, it seems that you could decode
:
...
BEGIN (* main*)
a := 3 + 2
END.TstDisam.
...
BEGIN (* main*)
a := 3 - 2
END.TstDisam.

Which brackets a range with no <relative> branches, for you to put your bytes in
to?



More information about the Oberon mailing list