Re: Release of RosAsm V.2.025a



Alex McDonald <alex_mcd@xxxxxxxxxxxxxxx> écrivait news:dfs2sf$bcp$1
@nwrdmz02.dmz.ncs.ea.ibs-infra.bt.com:

>> ... Too bad that you can't read.
>
> My reading's fine, thanks. What I'm trying to understand is how it does
> it (the algorithm), not how it's implemented (RosAsm). You're
> explanation isn't informative as a consequence. I'll try again;
>
> RosAsm builds a parallel table to the code it's optimising (actually,
> it's just a chunk of memory the same length as the generated code with
> flags and branch offsets). This table contains information about the
> jumps _only_. Meanwhile, somewhere in the symbol table are the labels.
> They contain offsets or pointers into the generated code.
>
> When the code generation is complete (presumably for a procedure only;
I
> don't think you can be globally optimising), there is interaction
> between the parallel table and the symbol table.
>
> Each time you compact a jump, the labels elsewhere in the code move.
How
> do you tell that A and B have moved? Do you update the symbol table?
How
> do you recalculate the jump offsets? Are they all recaculated on every
> pass? Do you pass the table from bottom to top, or top to bottom?


Let me tell you that it sounds a bit strange to me, that you
could ask questions about the details of the Implementation,
whereas the Source is GPLed, extreemely readable, and offered
in the context of an IDE where pointing anything out is always
a matter of "Click"...

1) The Map Table (parallele to the Code Section) holds nothing
but 0 and 1. ['1' at each Location, where a Long Displacement
has been Encoded].

2) When Encoding, RosAsm manages several separated Tables. For
examples, the Labels Table, the Equates Table, and so on...
It also manages a References Table, that holds the various
references encounted while encoding the Instructions, and
the real Displacements are only written at the very end of
all computations (even later than the JSO thingies).

3) Therefore, analysing if a Long Jump could be made short
is just a matter of analysing the substraction of the
Evocation Reference by the Declaration (Label Table...)
Reference.

4) Yes, of course, in the "Multi-Pass-Emulation", all of
the Tables (and the Code Section, and all) are entirely
compacted, before scanning the Map Table again, in the
Main Loop, which is a trivial as:

JmpsOptimize:
call ScanShortenJmpsTable

While D$NumberOfLongToShort <> 0
call CompactLabelListAndCodeRef
call CompactCodeList

call CompactShortenJmpsTable

call ScanShortenJmpsTable
End_While
ret

But, maybe, you are going to ask me to discribe what is
called, exactely... For the one interrested by the method,
the Source is provided, and for the ones not able to read
RosAsm unified and simplified Syntax, go and play football.


Betov.

< http://rosasm.org >






.



Relevant Pages

  • Re: This Crashes RosAsm
    ... They have posted Lists of Labels. ... I perfectely know how RosAsm works. ... I can't fix a bug that does not exist. ...
    (alt.lang.asm)
  • Re: HLA v1.68 is now available
    ... > L0< is a backward short jump. ... > long lables when RosAsm told me it was time to. ... >> about compiling and compiling again. ... >> Now if reusing Open Source code is fighting against the Open Source ...
    (alt.lang.asm)
  • Re: Gratitude in order !
    ... That's a different issue than the size of the jump, ... I'm pretty sure RosAsm *does* do this for you. ... There *is* a difference between assemblers, ... I once worked 9 month with a carpenter. ...
    (alt.lang.asm)
  • Re: This Crashes RosAsm
    ... >> Well, I tried Randy's sample code, and RosAsm crashed. ... >> your explanation for the crash? ... >> only happen when you have too many labels starting with the same ...
    (alt.lang.asm)
  • Re: Explanation of a swindling
    ... In the second Table, the Records are in linear order, ... In order to find answers to questions that you have not answered, I have looked into the RosAsm source. ... Another thing I discovered was your pathetic attempt to obfuscate the error message you print when you can't handle any more labels. ... It is entirely your fault for trying your best to make things difficult. ...
    (alt.lang.asm)