• Re: File type of machine code? Where does it start?

    From Bob Latham@bob@sick-of-spam.invalid to comp.sys.acorn.programmer on Wed Jun 25 09:29:43 2025
    From Newsgroup: comp.sys.acorn.programmer

    In article <103evcp$27cdp$1@dont-email.me>,
    druck <news@druck.org.uk> wrote:
    On 19/06/2025 10:23, Jean-Michel wrote:
    From DDE.Codestds.AOF
    There are two sorts of AOF: <little-endian> and <big-endian>.

    In little-endian AOF, the least significant byte of a word or
    half-word has the lowest address of any byte in the (half-)word.
    This <byte sex> is used by DEC,Intel and Acorn, amongst others.

    In big-endian AOF, the most significant byte of a (half-)word has
    the lowest.address. This byte sex is used by IBM, Motorola and
    Apple, amongst others.

    Never seen a big endian AOF in the wild, and suspect no-one else
    has either.

    I can only guess it was specified as a result of Sam Wauchope's
    crazed ideas about running a successor to RISC OS on Power PC or
    something.


    At first sight there is a strangeness to the data inside flac music
    files. They appear to use both big and little endian vaules which
    they do in a way and they don't at the same time. They often use the
    hi-byte for flags and blockid purposes.

    Here is the start of a flac file...

    0000 fLaC
    0004 [00][00][00][22] (low byte last Big-endian)
    0008 <34 bytes of data for STREAMINFO BLOCK>

    002A [04][00][02][B7] <= 04 says vorbis comment not last block,
    length = &02B7 (low byte last)
    002E [20][00][00][00]reference libFLAC 1.2.1 20070917
    (low byte first)
    0032 [16][00][00][00] <= number of items in list

    But also in the same file..

    [0E][00][00][00]TOTALTRACKS=28
    [0C][00][00][00]TOTALDISCS=2
    [26][00][00][00]TITLE=Third Movement (Cellos & Basses)
    [14][00][00][00]ARTIST=Gustav Mahler
    [2C][00][00][00]ALBUM=Symphony No. 2 "Resurrection" [Kaplan]
    [09][00][00][00]DATE=1988

    These are actual values taken from a flac track.

    Bob.

    --- Synchronet 3.21a-Linux NewsLink 1.2