[comp.sys.amiga] Hunk information

11TSTARK@GALLUA.BITNET (Timothy Stark) (06/26/89)

Hello Amiga Programmers/Developers:

    I currently am working on my new disassembler. I discovered that
mutliple hunk end commands in an executable file which results incorrect
if count end hunk commands. I corrected my new alogrithm to count data, code,
or bss hunk blocks instead of end hunk command to correct hunk alogrithm.
Please correct your programs which process hunk files. My OpenHunk
statement do that:

     1. Get hunk header at beginning of hunk file.

     2. Get data, code, or bss hunk blocks. If end hunk encounter at very
        start of hunk block. Repeat this step until encounter data, code,
        or bss blocks. Set exist hunk flag.

     3. Get symbols, and relocations blocks if possible.

     4. When encounter end hunk command, and check if exist hunk flag is
        set. If yes, icount hunk number. Otherwise, do not count. Reset
        exist hunk flag.

     5. If counter is exceed total of hunks that is from hunk header,
        stop here. Otherwise, go to step 2.


I hope this help!

-- Tim Stark
Timothy Stark          Bitnet: 11tstark@gallua.bitnet People/Link: OCS130
Gallaudet University   Internet: 11tstark@gallux.gallaudet.edu GEnie: T.STARK1
P.O. Box 1453, 800 Florida Ave., N.E., Washington, DC 20002
"Gallaudet University is the only university for the deaf in the world."