logs archiveIRC Archive / Undernet / #asm / 2006 / February / 6 / 1
_exe
Ugh.
Today I asked for you here :-p
malfunc
why?
sergiutz
(Action) is away (.. offline)
_exe
I don't know, I just thought of you.
Do you know Finntroll?
malfunc
yes, i think i have two albums of them as mp3
but i don't like it that much
Utterkins
the tca is here
_exe
TCXA without X.
Scientists have estimated that the energy given off during the Big Bang is roughly equal to 1CNRhK (Chuck Norris Roundhouse Kick)
Chuck Norris has already been to Mars; that's why there are no signs of life there.
Chuck Norris lost his virginity before his dad did.
Every time Chuck Norris smiles it saves the life of a dying man. Ironically, Chuck Norris only smiles after he kills someone.
On Neil Armstrong's second step on the moon, he found a note that said, "Chuck Norris was here."
voider
_exe, link plz
_exe
http://www.4q.cc/chuck
         

voider
thx
_exe
:_)
voider
Oxygen requires Chuck Norris to live.
heh
_exe
Hahah
Utterkins
am i the only one who doesnt know who the fu*k chuck norris is
TCA
karate guy
static3d_
Chuck Norris once got pulled over, and got a ticket for having too much blood in his alcohol stream.
_exe
Haha
l0cke
greetings
sergiutz
(Action) is away (.. offline)
Kiros
can some one give a good free ebook for learning assembly in dos ? thx
sergiutz
(Action) is away (.. offline)
mixon
does anyone know how to set up 3 sperate webcams via the internet with out useing a commercial program?
EvileCatta
Hey!
where is my uncle? :(
le sigh
boro boro boro
fine fu*k you all
georgeATT
HI
Coder`TuX
hi, i'm new to assembler... can someone tell me what the difference between pushl and push is? (same for popl and pop)
Inode
well in AT&T syntax, the instruction suffix, 'l' in this case means long (32-bits), you also get 'w' which is word (16-bits), and 'b' for byte (8-bits).... when there is no suffix... the operand sizes determine which instruction suffix would be used basically
so push %eax would be the same as pushl %eax... or push %ax would be equiv. to pushw %ax
Coder`TuX
thanks Inode! does the same rule apply to all instructions?
Inode
not always
depends on the purpose of the instruction
GNU Assembler references can tell you more about how it works
tiocsti
it applies to most instructions, i like it better than having stuff like 'word ptr' and so forth
         

Inode
i agree.. src before dest makes better sense too
edcba
at&t suxx
tiocsti
apples assembler seems to be dst,src for ppc
it was confusing
i rarely see intelish assembler on anything but x86
edcba
and (%ebx,4,5) is less confusing than [ebx*4+5] maybe ?
tiocsti
i just wish intel supported add eax, ebx, ecx
(Action) sighs
on the other hand i can do movl %edi, (%esi) on intel, which is impossible in a lot of architectures (in a single instruction)
or even better movl $blah, %esi which in sparc takes 2 instructions (32 bit) or 4 instructions (64 bit), same on ppc
(Action) grumbles
edcba
you just to have to build your own cpu :)
tiocsti
i like sparcs, i like fixed length instructions, cept when it comes to moving immediates to a register
ppc mnemonics are less clear tho
Coder`TuX
are theese instructions equivalent: mov %eax,(%esp) | pushl %eax ?
edcba
no
Coder`TuX
:/
tiocsti
it takes 2 instructions to simulate a pushl
Coder`TuX
uhm... :/
dbtid
hi
what about the ppc?
lis and ori
yes it's always ds,srca,srcb
as in Rd <= Ra + Rb
tiocsti
i use lis/la in ppc
but on sparc sethi/or
dbtid
la is a sort of macro-ish device to do the lis and ori
at least, on some assemblers
tiocsti
hmm i dont think it does both, does it?
dbtid
the LA?
has to.
tiocsti
even if its a 16 bit arg?
Coder`TuX
can someone take a look at this address? http://pastebin.com/541631
tiocsti
if(target.arch == POWERPC && target.os == OSX)
{
fprintf(output_fp, ".machine ppc\n");
fprintf(output_fp, ".text\n");
fprintf(output_fp, ".align 2\n");
fprintf(output_fp, ".globl start\n");
dbtid
something has to zero out the top 16 bits
tiocsti
fprintf(output_fp, "start:\n");
fprintf(output_fp, "lis r2,ha16(stack)\n");
fprintf(output_fp, "la r31,lo16(stack)(r2)\n");
}
Coder`TuX
it the first part the same as the second?
dbtid
well, LA isn't a real instruction as such
it's a simplified mnemonic
tiocsti
i had issues with apples assembler, it didnt match my documentation, and ppc assembler seemed a bit troublesome to me
prob didnt help that i was using ibm ppc documentation
and the syntax was different
dbtid
the motorola book states that LA RD,d(Ra) is same as
addi rd,ra,d
tiocsti
yeah that makes sense
dbtid
and if there's a base registers
it's
ugly
there doc's are odd
tiocsti
and it took me forever to workthrough a bug
dbtid
i don't like what they did
tiocsti
sc still angers me
dbtid
so, i was wrong; it's not an lis
well, not in there book
i think gcc does it that way sometimes.
tiocsti
the sc semantics made me mad
dbtid
?
tiocsti
if a syscall fails, the instruction after sc is executed
if it doesnt fail, the instruction after sc is skipped
dbtid
so the instruction after is a branch to an error handler
tiocsti
yeah if you care
dbtid
and the instruction after the instruction after the sc is the rest of it.
tiocsti
its kinda dumb
if you care you can cmp and branch yerself
if(target.arch == POWERPC && target.os == OSX)
{
fprintf(output_fp, "li r0,4\n");
fprintf(output_fp, "li r3,1\n");
fprintf(output_fp, "mr r4,r31\n");
fprintf(output_fp, "li r5,1\n");
fprintf(output_fp, "sc\n");
fprintf(output_fp, "nop\n"); // fu*k you ibm!
heh
i didnt care, obviously
dbtid
that might be one of those things that's defined by a particular operating environment
tiocsti
that semantic exists everywhere, even power has it
dbtid
MPCFPE32B/AE doesn't define it that way
tiocsti
you often see sc/b blah/b blahagain
dbtid
so it must be defined in the OEA
i don't think i've ever seen an sc instruction in code.
i don't do things like that
i'm more worried about how the idiots who built the assembler are screwing up doing the loads and stores w.r.t. efficient operation
i don't think these guys read any of the ppc compiler how-tos
tiocsti
i havent seen a ppc assembler i like
and i hate most of the mnemonics
i think it's just the ibm influence
dbtid
heh
tiocsti
the only thing i liked was sprs for t hings like lr
instead of wasting a gpr
although my depth of ppc knowledge was about 5 mins with a instruction reference and some gcc -S stuff
dbtid
i think there's a lot to like in there
some of the instructions are quite powerful
tiocsti
just enuff to figure out how to do the little i needed to do to get the bf compiler working on the g4
dbtid
but it's a bear to learn them
and i don't think most compiler writers really get into it
tiocsti
there were pages and pages of branch instruction s
dbtid
you'd really have to know some of the tbales well
tiocsti
i couldnt find the right mnemonic for the opposite of bne
« prev 1 2 next »