@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3



Comments:

<0> :w
<0> whoops
<1> vim ftw!
<2> indeed
<0> hehe
<3> in long mode, r8l is the low byte of r8 (as al is to rax), what is 'r8b'?
<3> and is there really no r8h? as in ah is to rax.
<3> looks like the do not exist after all.
<0> there is no r8l.
<0> b in r8b is 'byte', which is low 8 bits of r8
<0> r8w is low 16 bits [word]
<0> r8d is low 32 bits [dword]
<0> r8 is full register
<0> and there really is no r8h.
<3> this person says r8l is described in the intel manuals as a synomyn to r8b: http://board.flat***embler.net/topic.php?t=5506
<0> also, ah, ch, dh, bh are *deprecated* in x86_64. DON'T use it.



<3> I'm trying to figure out why r8b and r8l would ***emble differently if they are synonyms.
<0> ok, possibly it's a synonym. gas rejects it, anyhow. r8b is the offical version.
<3> ok, I'll stick with r8b. :)
<0> sigh. what does r8l ***emble to?
<0> some guy could possibly interpret it as r8 'long'... which would be 32-bit or 64-bit
<0> but it seems they should ***emble to the exact same thing
<3> ollydbg won't open this PE64 exe. I'll have to find a hex dump util.
<0> %([0-9]*$)?[0 -+'#]*([1-9][0-9]*)?(\.[0-9]*)?(|ll|l|h|hh|j|z|t|L)[diouxXcsfFeEgGaApn]
<0> hm... no, still incomplete
<4> *sigh* someone invited me to join a c++ users group... apparently, they're talking about template metaprogramming (mostly) i lost interest. i told the group members to join a programming fashion show instead and leave me alone
<0> *ugh* templates
<4> i dread that monstrosity
<0> which monstrosity?
<4> i guess the only reason why someone would do template metaprogs is when he/she wants to impress his/her friends :D
<4> the monstrosity that is template metaprogramming
<0> ... or utilise libstdc++, yeah
<0> ok, fixed my regex...
<0> %([0-9]*$)?[0 -+'#]*([1-9][0-9]*|\*([0-9]*$)?)?(\.([0-9]*|\*([0-9]*$))?(|ll|l|h|hh|j|z|t|L)[diouxXcsfFeEgGaApn]
<4> ?
<0> nothing, i'm just trying to write an ANSI-compliant printf.
<0> this is regular expression that describes one conversion specifier.
<0> now, now... use DFA or just write a dumb parser using lotsa goto's...
<5> ahh regex
<5> i love such a forest of brackets
<0> this is perversion... sort of
<4> now.. that's one sure way to impress friends :D hihihih
<0> or to get rid of own sanity
<0> yeah
<6> just asking for a hint here ... in the beginning of the kernel head.S file I want to add a debug "function" called __backlight_debug ... the syntax I used was: __backlight_debug: <newline> mov r0, #0x0<newline>mov r1, r1, #0x41000000<newline> orr r1, r1, #0x00300000<newline> orr r1,r1, #0x00000004 , and I'm calling the function from within another using the code: bl __backlight_debug ... is this the correct way to do this?
<0> mov r1, r1, #0x41000000
<0> this seems just wrong
<0> since mov takes only 2 parameters
<6> markos_64, whoops ... heh. typo. I only use 1 r1
<0> and about the bl... bl is ok to call a function, but bl destroys lr [r14], which means that if calling function was also called from another function and intends to return there, then you have to save lr before call and restore it afteerwards.
<6> okay ... so save lr at the beginning of __backlight_debug, and then restore it @ the end of __backlight_debug ?
<0> no.
<0> you save it before call and restore after return, obviously.
<6> kk.
<6> okay. so just pick a free register and use strb r14,[<free register>] to copy it over then.
<0> strb? mov.
<0> strb is a memory store, remember?
<6> k. mov makes more sense.
<0> besides, strb is *byte* store. that's even worse.
<6> ah. str would be better than str.
<6> er ... str > strb :P
<0> mov > str, though, if you got a free register.
<0> besides, to use str, you first have to ensure that <free register> actually points to some free memory cell.
<6> markos_64, true enough. thank you for being patient with me.
<6> ah.
<0> it's simply
<0> mov foo, bar --> foo = bar
<0> str foo, [ bar ] ---> *bar = foo
<6> ahh. the difference between ***ignment and pointers. that makes sense. (I <3 C)
<0> hehe
<6> markos_64, would doing : mov r1, #0x41300004 ***ign the whole address to r1?
<6> (saves me some code)
<0> no. you cannot.



<0> because ARM is RISC architecture.
<0> which means "Reduced Instruction Set Computer". in particular, the numeric values you can stuff are quite limited.
<6> yeah.
<0> the exact limitation is: you need to be able to represent the number as something 8-bit rotated left in 32-bit register by even number of bits.
<0> complicated, yeah.
<6> yeah, so doing it as 2 digit intervals is the most I can do.
<0> yup
<6> well ... I guess there are trade offs for everything.
<0> right after i finished getting %d to work:
<0> mwk@Novus /home/x-os/mapx/liba $ wc stdio/printf.c 704 2136 13955 stdio/printf.c
<0> good/bad for printf?
<7> how are the two following statements different:
<7> shrl $2, %edx
<7> shrl %edx
<7> trying to kink out some optimization bits
<0> shrl $2, %edx shifts edx right by 2 bits
<0> shrl %edx takes default of shifting right 1 bit.
<7> Ah, gotcha, thanks
<0> GRML
<0> apparently in my brand-new printf, *only* plain %d works :(
<0> and gdb likes to **** ****... which is bad when you actually want to use it
<8> I've noticed that.
<6> okay ... how would I properly include a C command in an ***embly file?
<0> wtf... how does it come up with that... printf ( "%2$d %1$d\n", 12, 14); gets me "000 14"...
<0> Cripps: you cannot.
<6> damn. I thought there was a way.
<0> you could however call C function from external file.
<0> ok, positional parameters working... so far, so good...
<7> what does sarl mean?
<7> and what is the difference between jle and jbe
<0> difference between jle and jbe is exactly the same as between sarl and shrl.
<0> namely, signed/unsigned versions of operands.
<0> sarl shifts right, arithmetically. so that it works like signed division.
<0> shrl shifts right, logically, resulting in unsigned division
<7> the later being a bit shift, correct?
<7> such as >>1
<7> rather than /2
<0> jle jumps to given parameter if and only if in previous comparison the first parameter was lower or the same as second, when interpreted as signed numbers
<0> jbe jumps to given parameter if and only if in previous comparison the first parameter was lower or the same as second, when interpreted as unsigned numbers
<0> and, no.
<0> both are >>
<0> and both are /2
<0> it's just that
<0> unsigned int i;
<0> i = i >> 1;
<0> is shrl $1, i
<0> signed int i; i = i >> 1;
<0> is sarl $1, i
<0> and the unsigned version is the 'normal' bitshift
<0> meaning that 10101010 >> 2 == 00101010
<0> signed version, OTOH, propagates the sign bit as expected to give proper signed division. 10101010 >> 2 == 11101010.
<7> oh hmm, i see, this all stems from a discussion we were having about gcc optimizing /2 to be >>1, i don't believe it does, trying to compare ***embler files
<7> + shrl $31, %eax
<7> + leal (%edx,%eax), %eax
<7> those are two of the lines that /2 adds
<7> http://rafb.net/paste/results/k5tPVO32.html
<7> there is the complete diff...not sure what story it tells however
<9> question markos_64 is AT&T syntax worth learning or should one stay with intel
<0> johnjay: could you paste full dump?
<0> johnjay: and source to that test, too
<7> will do
<7> what full dump?
<0> erider: depends on what're you going to do. if it's gcc<->asm interfacing, sure as hell. drop intel.
<0> erider: if you like to do freestanding asm, you could just stick to nasm/fasm/whatever.
<0> johnjay: dis***emblies of both versions.
<9> so using nasm to wrap with C is a no go?
<7> http://rafb.net/paste/results/INKEWi45.html and http://rafb.net/paste/results/ji2iIj17.html
<7> ok
<0> erider: it's possible to call functions from each other. but with AT&T, you can stuff pieces of asm directly between lines of C expressions in C functions.
<0> erider: very useful for OS writing, probably useless for anything else.
<7> http://rafb.net/paste/results/FIRXv575.html (bittest) and http://rafb.net/paste/results/yBQebV84.html (divtest)
<7> and something of interest, found that in gcc 4.1.0 treats / 2 as floating point, http://groups.google.fr/group/comp.lang.c/browse_thread/thread/d10a61204077c60a/11d81a2540f9230e


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #asm
or
Go to some related logs:

#linux
hard disk boot sector invalid grub puppy
prototype.js browser detection
KirstyBlue download
#php
xmlftprequest
#perl
php regexp valid windows filename
start bittorrent ubuntu
#php



Home  |  disclaimer  |  contact  |  submit quotes