From: Betov on 5 Sep 2005 09:11 RosAsm V.2.025a is released. Main new points since V.2.021: * New version of the Equal Pre-Parser. * New release of the Disassembler, with first implementation of Map File. * New release of the Debugger. Review of the WatchPoints, of the Interface (ToolBar,...) * Review of the Conditinal Macros, with generalisation of the '#N' Key. * Jumps Size Optimizations. * Enable multiple Clip Files. * Restart the LibScanner from scratch * Implement the Tag Menu ID (for Instant Edition). * New version of the Form Wizard, with Treeview display for styles, Grid, ... * Assembler: Speed-up pre-computation of the nested Equates. Up to 25% saved on files making some heavy usage of imbricated Equates (Typically OOP Style). < http://rosasm.org/ > _____________________________________ RosAsm is a Bottom-Up PEs Assembler for ReactOS (ReactOS, WINE, Windows 95/98, NT/2000, XP,...). It is a free, GPLed, auto-compilable Assembler, and is the only Assembly Environnement coming with full integration of all its components: * Assembler: The fastest of the actual assemblers, (1.5 Mega/second on a Celeron 1.3 Ghz...) directly outputting PE files on a simple click, with a very powerful macros system (a macros unfolder is available by a double-click, through a float menu). Simplified Intel syntax. Does not need any include, prototype or header companion file. Nothing but a single simple source. Complete implementation of the mnemonics set, up to SSE2. RosAsm Bottom-Up Assembler is a true low level Assembler, enabling HLL writing styles by user defined macros and/or by HLL pre-parsers selections. * Disassembler: To date, RosAsm is the one and only two-clicks- disassembler-reassembler ever seen. It is, actually, fully effective on most small files and on many middle size applications: The dream tool for study and/or for porting your works to assembly. * Debugger: Source level Debugger with a state-of-the-art memory inspector and very advanced features, like the dynamic break-points, that can be set/removed by simple clicks, as well as at write-time and/or at run-time, like with the most advanced HLLs. To run the Debugger, You simply click on [Run] and your application is running through the debugger. Any error (or watch-points, or break-point, enabling advanced stepping modes) is pointed out directly in your source code. Accurate messages are delivered on errors cases. * Sources Editor: Real Sources Editor with tons of unique features, specificaly devoted to secure editions and to huge mono-files assembly sources: Tree-view, instant jump to any type of declaration by simple right-click, division of the mono-files into TITLEs, advanced IncIncluder pre-parser, and so on... * Resources Editors: Original Resources Editors, with control of matching styles, outputting as well resources, files, and memory templates. * Wizard for visual design. * Clip file system, for templates reuse. * Integrated OS Equates, and Structures files, saving from any boring include. * Integrated Help system, with a complete 32 bits Assembly Tutorials, Opcode help, and RosAsm Manual (1.5 mega of documentation, grouping close to 600 organised rtf files). .... and much more... Betov. < http://rosasm.org/ >
From: randyhyde@earthlink.net on 9 Sep 2005 00:48 Betov wrote: > > * Jumps Size Optimizations. > This might be a cool feature and welcome addition to RosAsm if it actually worked. I assume that choosing "Optimize Jump Sizes" from the compile menu is how you activate this feature (sorry, but all the documentation says is that you don't support branch size optimization, no other instructions on it's use). Cut and paste the following test code into a simple RosAsm program: jmp lbl1; // 2/6 bytes jmp lbl2; jmp lbl3; jmp lbl4; jmp lbl5; jmp lbl6; jmp lbl7; jmp lbl8; jmp lbl9; jmp lbl10; jmp lbl11; jmp lbl12; jmp lbl13; jmp lbl14; jmp lbl15; jmp lbl16; jmp lbl17; jmp lbl18; jmp lbl19; jmp lbl20; jmp lbl21; jmp lbl22; jmp lbl23; jmp lbl24; jmp lbl25; jmp lbl26; nop; nop; nop; // The "Magic" NOP. lbl1: nop; nop; nop; nop; nop; lbl2: nop; nop; nop; nop; nop; lbl3: nop; nop; nop; nop; nop; lbl4: nop; nop; nop; nop; nop; lbl5: nop; nop; nop; nop; nop; lbl6: nop; nop; nop; nop; nop; lbl7: nop; nop; nop; nop; nop; lbl8: nop; nop; nop; nop; nop; lbl9: nop; nop; nop; nop; nop; lbl10: nop; nop; nop; nop; nop; lbl11: nop; nop; nop; nop; nop; lbl12: nop; nop; nop; nop; nop; lbl13: nop; nop; nop; nop; nop; lbl14: nop; nop; nop; nop; nop; lbl15: nop; nop; nop; nop; nop; lbl16: nop; nop; nop; nop; nop; lbl17: nop; nop; nop; nop; nop; lbl18: nop; nop; nop; nop; nop; lbl19: nop; nop; nop; nop; nop; lbl20: nop; nop; nop; nop; nop; lbl21: nop; nop; nop; nop; nop; lbl22: nop; nop; nop; nop; nop; lbl23: nop; nop; nop; nop; nop; lbl24: nop; nop; nop; nop; nop; lbl25: nop; nop; nop; nop; nop; lbl26: With the "Magic" NOP in the code, each jump instruction should be five bytes long. With the "Magic" NOP commented out, each jump instruction should be two bytes long. When I disassemble your code (after using the "optimize jump sizes" option), with the magic NOP missing, it shows that all the jumps are five bytes long, with displacement values that are less than $80. I suspect you've not tested this feature very well as it doesn't seem to produce results any different from a standard compilation. Then again, with no documentation on its use, perhaps I'm doing it wrong. Feel free to enlighten me if this is the case. Cheers, Randy Hyde P.S. Looking forward to the "this is an insane program and nobody writes code this way, so this is not a bug and I won't fix it..." response we've come to expect from you.
From: randyhyde@earthlink.net on 9 Sep 2005 00:52 randyhyde(a)earthlink.net wrote: > lbl25: > nop; nop; nop; nop; nop; > lbl26: > Excuse me, the syntax above is for HLA, which I used to get the code working to verify the size optimizations. Substitute a "|" for the ";" symbols between the nops. Sadly, even with only one NOP per line, RosAsm doesn't seem to be generating the smaller jumps, which should have been a no brainer. Sorry, Randy Hyde
From: Alex McDonald on 9 Sep 2005 04:49 Betov wrote: > > And, if i may add, anyone wishing to develop an Assembler > doing Jumps Size Optimizations, - in one single and simple > additional Computation, taking almost no time , instead of > the traditional Multi-Passes -, can take a lesson from > RosAsm Source. > Backward jumps are trivial; the distance is known because the code has been generated. But how do you assess the jump distance for forward jumps without a second pass? This; jmp B ...code... jmp A ...code... B: ...code... A: ...code... requires that the jump to B is dependant on the length of the jump to A opcode. Can you describe how you optimise this in one pass? -- Regards ALex McDonald
From: Betov on 9 Sep 2005 05:15
Alex McDonald <alex_mcd(a)btopenworld.com> ýcrivait news:dfri9s$oj7$1 @nwrdmz02.dmz.ncs.ea.ibs-infra.bt.com: > Betov wrote: > >> >> And, if i may add, anyone wishing to develop an Assembler >> doing Jumps Size Optimizations, - in one single and simple >> additional Computation, taking almost no time , instead of >> the traditional Multi-Passes -, can take a lesson from >> RosAsm Source. >> > > Backward jumps are trivial; the distance is known because the code has > been generated. But how do you assess the jump distance for forward > jumps without a second pass? This; > > jmp B > ...code... > jmp A > ...code... > B: ...code... > A: ...code... > > requires that the jump to B is dependant on the length of the jump to A > opcode. Can you describe how you optimise this in one pass? Before giving any kind of credit to the insanities of our famous swindler, Alex, you'd better take a look at how the things are implemented in RosAsm Source, by following, for example, the 'ShortenJumpsWanted' Flag, with the various Double-Click and Right-Click Features. You would then see that the Optimizations are done backward and forward. You would also see that these optimizations apply upon the Jcc Instructions, which are, at a logical point of view, the only one where this kind of Optimization can have any real effect. Plus, if you knew a bit of 1) RosAsm Syntax, and of 2) the PE format, you would know that the size of a PE cannot be reduced under the range of the File Alignment Sections, and that RosAsm _never_ implements Short Jumps on Plain Labels, which would not make any sense, but only on Local Labels. Betov. < http://rosasm.org > |