| |
| |
| |
|
Page: 1 2
Comments:
<0> anyway, wereHamster: read psABI-i386. it describes some PIC tricks. <0> the general idea goes like that: <0> call label <0> label: <0> pop eax <0> then address stuff by [varname - label + eax] <1> interestnig <1> s/ni/in/ <0> though nasm is too stupid to figure out proper relocations when varname and your code are in different sections. maybe yasm is better. but it definately works with gas <2> since yMul is only 4 bytes (32bit), it seems easier to me to use immediate values (with maybe a '%define yMul 0x??..' at the begining of the file to make it more readable). <0> yeah <3> tried fasm? <2> no, why? <3> its smarter than nasm in most situations <3> and all around a better ***embler <2> I'll stick with yasm, thanks :)
<3> your choice <3> but I've used 'em all <3> gotta give it to fasm <2> smarter in which way? it's ***embler, what possibly could yasm do wrong? <0> lots of things <0> like, it could generate ****ed up ELF file <0> and in fact, sometimes it does <3> addressing, segments, preprocessor, encodings, object/image format <3> there are many ways to be better <3> or worse <3> also the fact fasm is written in... fasm is a good selling point <2> I have only two functions implemented in asm, and both use only mmx more or less <1> RedGhost: fasm is written in fasm? <3> yes <0> RedGhost: which more or less means that you cannot compile fasm from source unless you already have fasm. <1> sounds bad <3> bad? <1> it's x86-only then? <0> bad. <3> yes :\ <3> x86/x86-64 <2> I need amd64 ;) <2> oh <1> one of the best things about nasm are that i can run it on any computer <0> cross-compillation is impossible with that <3> it supports x86-64 <3> and generates elf64 and 64bit pe <0> which can be important... or not <1> even realmode dos <3> yeah lets compile our x86 code on sparc <3> so we cant test it <1> RedGhost: is fasm written in 32-bit protected mode asm? <3> depends on the build <3> DOS, Windows, UNIX, Linux <3> http://www.flat***embler.net <0> lindi-: does it really matter? when done correctly, the same code can run well compiled both for PM32 and for RM <1> hrm <3> the DOS version is a RM .com <3> its all one source <1> ok <3> and its open source <3> Just based on optimization, preprocessor, targetted platforms and community <3> it stands out over most <3> I can't comment on GAS though the syntax disgusts me <3> %eax(-1, 5) or whatever, just doesn't sit right with me <1> what does that 'The licence and distribution terms for any publically available version or derivative of this code cannot be changed. i.e. this code cannot simply be copied and put under another distribution licence (including the GNU Public Licence).' mean? <4> does fasm only support intel style ***embly? <3> it means you cant re-release the fasm code <3> under a different license <3> but if for whatever reason you wanted to, just pm Tomasz <3> its the same as any other license <3> you cant just release GPL code as BSD <3> and etc <1> with copyleft yes <3> his is just liberal, you're not forced to open source anything, but you are encouraged to considering almost anything on the fasm boards is open source <1> well, it can't be combined with any other code :/ <3> if you take GPL code, and combine it, it has to be released under GPL <3> its the same thing more or less <3> but I haven't seen anyone basing a project off fasm, or even nasm really so it's never been a factor that i've seen <3> (well, besides ndisasm) <2> anyone familiar with mmx? why can't I 'movq mmx7,0x0' ? it says 'invalid combination of opcode and operands'
<1> well, i'm still not sure if that is even free or not, the wording is somewhat well, short <3> the source and binaries are free, if that's what you're asking <0> wereHamster: because you can't. but, consider 'pxor mm7, mm7' <3> he just doesnt want someone taking his code and re-releasing it under gpl <3> hence the "copied" <1> RedGhost: i'm asking whether FSF, debian and OSI consider those free <1> i'm not a license expert <3> if they don't consider that free, they can't consider gpl free <2> mwk, unfortunately I need to put '0x0000004200810019' into mmx7 :( <3> its just one clause from GPL <1> the license seems to be copy-paste (including typos) from "Original SSLeay License" <0> wereHamster: so you need memory operand <2> and I'm back in the PIC hell :P ... <0> wereHamster: or some movd+shift <1> RedGhost: oh it's not so simple :) <0> wereHamster: <3> the can't be copied and release under another license is a clause in almost any popular license <0> call skip <3> besides maybe BSD which basically says do anything <0> dq 0x00000423blablha <0> skip: <0> pop eax <0> movq mm7, [eax] <3> gotta love those eip from the stack tricks <0> it's actually the only way to get eip on x86 IIRC... <3> isn't rip accessable in x64? <0> on x86-64, yes it is <0> lea eax, [rip] <3> too bad it's a piece of **** hybrid that is no joy to work with <0> er, rax <2> .. and I have three such values I need to use in the function. I'll take a look at the psABI document. <0> wereHamster: so make a bigger literal pool <1> RedGhost: http://lists.debian.org/debian-legal/2001/06/msg00056.html suggests that the clause is just "no-op" <0> and use [eax + offset] <0> just take the address of the literal pool somewhere at beginning of function <3> yes <3> I tried to explain that <3> a few times <3> already lindi <0> psABI describes much more hardcore techniques, for accessing stuff in other libraries <0> if you don't need stuff from other libs, just use the literal-pool technique <3> I swim in literal pools <2> won't the 'call' add additional overhead? <0> wereHamster: sure it will. but there's no way to make PIC without knowing eip. and there's no way to get your eip without a call. <0> [or an interrupt, but that's even worse and harder] <0> blame x86 designers. <2> basically intel? :P <3> intel didn't invent the specification <3> they implimented it <0> another thing that you can do is to construct the value in GPRs and movd/shift it into mmx <0> or, <0> push 0xhigh_part_of_imm_value <2> mod doesn't work with mmx registers <2> movd <0> push 0xlow_part_of_imm_value <0> movq mm7, [esp] <0> movd does. <1> RedGhost: ok so it's non-copyleft <2> 'movd mm7,0x1' gives me invalid combination, too <0> movd mm7, eax <3> lindi- I'm not down with all your trendy unix terminology, its free and open source and can be redistributed <0> with moving stuff to eax first <0> yes, it ****s. <0> but, try the stack trick: <3> I use Linux, but I'm not some hardcore guy, I use propriety software <0> push 0xhigh_part_of_val <0> push 0xlow_part_of_val <0> movq mm7, [esp] <0> three instructions, no jumps/calls <0> [remember to clean up the stack properly] <1> RedGhost: unix terminology? ;) <3> >;} <1> i use debian and free software, maybe i'll wait till yasm is in debian if it's ever :) <3> I use debian and free software, but I use Windows, DOS, and propriety software as well
Return to
#asm or Go to some related
logs:
#web 2.6.15 ipt_ROUTE
#python #perl python string of bytes wave #perl config_hwmon gentoo GOOGLE AERCH innodb rowid putty default mouse pointer
|
|