|
From: Frank Kotler on 15 Aug 2008 12:40 rio wrote: > <+File pretty2.zip(4.45Kb)> > Do you like my last program for formatting asm code? Can't actually try it... (could you post a brief example of what it does?) One thing I noticed, taking a quick look at the code... You "cmp eax, "db "", etc... but I don't see "dw ". "Modern" Nasm also has "do" and "dy". Also, "back-apostrophe" strings have been added (accepts "\n" and such C-isms). Nobody *uses* these things yet (I imagine), but you might want to be ready for 'em... Best, Frank
From: rio on 15 Aug 2008 14:14 "Frank Kotler" <fbkotler(a)verizon.net> ha scritto nel messaggio news:g84bii$3pd$1(a)aioe.org... > rio wrote: >> <+File pretty2.zip(4.45Kb)> >> Do you like my last program for formatting asm code? > > Can't actually try it... (could you post a brief example of what it does?) > > One thing I noticed, taking a quick look at the code... You "cmp eax, "db > "", etc... but I don't see "dw ". "Modern" Nasm also has "do" and "dy". > Also, "back-apostrophe" strings have been added (accepts "\n" and what is "do" and "dy"? i think i have problem with the "back-apostrophe" strings too `is this a back apostrophe string?` have to add to " and ' ` i'm sloppy > such C-isms). Nobody *uses* these things yet (I imagine), but you might > want to be ready for 'em... > > Best, > Frank
From: rio on 16 Aug 2008 02:12 "rio" <a(a)b.c> ha scritto nel messaggio news:48a66520$0$40306$4fafbaef(a)reader5.news.tin.it... > > "rio" <a(a)b.c> ha scritto nel messaggio > news:48a554aa$0$40305$4fafbaef(a)reader5.news.tin.it... >> <+File pretty2.zip(4.45Kb)> >> Do you like my last program for formatting asm code? >> nasme -fobj pretty2.asm >> alink -oPE pretty2.obj Win32.lib >> Is it possible to use [in a PE] >> the same console that make it run for input-output? > > some little change for take count of "do", "dy" > \0x96, global, extern, resb,resw, resd > don't know if it is ok i did make some test and there is something wrong possibly my program add some instruction it result that the obj code of the same file has 4 bytes more than the other and the change seems to be in the start of these obj files Obj1 00000000 800800 or byte [eax],0x0 00000003 06 push es 00000004 7472 jz 0x78 00000006 2E61 cs popa 00000008 736D jnc 0x77 0000000A 1D88210000 sbb eax,0x2188 0000000F 001D54686520 add [0x20656854],bl 00000015 4E dec esi 00000016 657477 gs jz 0x90 ------------------------------------------------------- from here seems the same 00000019 6964652041737365 imul esp,[ebp+0x20],dword 0x65737341 00000021 6D insd 00000022 626C6572 bound ebp,[ebp+0x72] 00000026 2030 and [eax],dh 00000028 2E3938 cmp [cs:eax],edi 0000002B 2E3338 xor edi,[cs:eax] 0000002E E396 jecxz 0xffffffc6 00000030 1800 sbb [eax],al 00000032 00055F444154 add [0x5441445f],al ******************************************************* Obj2 00000000 800C000A or byte [eax+eax],0xa 00000004 7472 jz 0x78 00000006 5F pop edi 00000007 42 inc edx 00000008 7466 jz 0x70 0000000A 2E61 cs popa 0000000C 736D jnc 0x7b 0000000E 9A88210000001D call 0x1d00:0x2188 00000015 54 push esp 00000016 6865204E65 push dword 0x654e2065 0000001B 7477 jz 0x94 ----------------------------------------------------- 0000001D 6964652041737365 imul esp,[ebp+0x20],dword 0x65737341 00000025 6D insd 00000026 626C6572 bound ebp,[ebp+0x72] 0000002A 2030 and [eax],dh
From: Frank Kotler on 16 Aug 2008 21:34 rio wrote: > "Frank Kotler" <fbkotler(a)verizon.net> ha scritto nel messaggio > news:g84bii$3pd$1(a)aioe.org... >> rio wrote: >>> <+File pretty2.zip(4.45Kb)> >>> Do you like my last program for formatting asm code? >> Can't actually try it... (could you post a brief example of what it does?) >> >> One thing I noticed, taking a quick look at the code... You "cmp eax, "db >> "", etc... but I don't see "dw ". "Modern" Nasm also has "do" and "dy". >> Also, "back-apostrophe" strings have been added (accepts "\n" and > > what is "do" and "dy"? 128-bit and 256-bit quantities... > i think i have problem with the "back-apostrophe" strings too > `is this a back apostrophe string?` Right. `this is a string with a newline\n` `this is a zero-terminated string\0` > have to add to " and ' ` I guess. That character is almost invisible in the font I'm reading this with - I almost missed it! > i'm sloppy Well, "pretty3" is probably useful for most things even if you don't handle *every* fool thing Nasm might let you do. Thanks for sharing it with us! Best, Frank
|
Pages: 1 Prev: NASM 0.98.39 vs. NASM 2.03.01 disassembly Next: JWasm v1.9 - now 1.91!!! |