@# Quotes DB     useful, funny, interesting





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



Comments:

<0> please help! i wrote a boot loader and C kernel. I need help on integrating them together
<0> i found some examples on osdev site but they were missing some things...i could use more somewhere else
<1> seb-: what's the problem?
<0> skuggi: thanks...well you need an entry point for kernel to call your c function....ok...then you need a loader (ld) script..ok......i did that but it crashes
<0> skuggi: a complete toy example would be perfect that works...do you know of any?
<1> no...
<1> loader script?
<0> skuggi: the 2 examples on osdever.net has this elaborate ld script for god knows what reason
<0> skuggi: i'll try to get you url if you want to see it
<0> skuggi: in the middle of http://www.osdever.net/bkerndev/index.php?the_id=90
<1> seb-: you sure you don't mean linker script+
<1> ?
<1> that is quite a different thing.
<1> it tells the linker how to put you program.
<1> what to put where.
<1> and so on



<1> well, i'm off for a smoke. brb
<1> back..
<0> skuggi: u know of a hidden stash of at least ONE toy bootloader + C kernel that works?
<0> skuggi: (besides osdever.net?)
<1> seb-: no, but are you sure you were talking about a loader script, and not a linker script, cause ld is a linker
<0> skuggi: i meant linker script...sorry
<1> seb-: ok. well, then i already explain what that is :P
<2> hi all... basic at&t asm question... my_byte: .byte 0 reserves 1 byte. how I reserve 10 bytes without typing .byte 0 10 times?
<2> .rept 10 .byte 0 .end ?
<3> or use the .lcomm dirrective
<2> .endr, rather. or is there a better way?
<3> but thats only valid in the .bss section
<2> does at&t use the .bss section too?
<2> I thought that was only intel
<3> .bss has nothing to do with the syntax, it has to do with how executable files are mapped into memory
<2> .bss my_bytes: resb 10 would reserve 10 bytes at address my_bytes?
<3> no
<3> .section .bss
<3> .lcomm buffer, 100
<3> resb doesn't work in at&t
<3> if you are more comfortable with intel syntax, you should really use fasm
<2> I am, but I want to learn at&t. I guess this is what geeks do on vacation :-)
<2> I /have/ left some time for the ocean, though
<3> I hate at&t syntax, there is no point in learning it
<2> my wife thinks I'm looking for places to eat tonight, so don't rat me out please
<3> I don't even know your wife
<2> well, linux is gnu, and gnu as is at&t syntax so I thought it might be worth it to learn
<2> I know you don't. I was only kidding
<3> node_6 most people involved in the open source hates at&t syntax
<2> noted
<2> are there any advantages or disadvantages to using a .bss section instead of .rept 10 .byte 0 .endr ?
<3> yes, if you use the .bss section the resulting executable file will be smaller
<2> so .data is stored as part of the binary and .bss is allocated at run-time?
<3> yes
<2> thank you. very helpful :)
<3> no prob
<2> if I want to call stat I need to be able to create the 'stat' structure. With the info from 'man stat' how can I break it down? Find the size of the entire structure and where in the alloc'd memory each element resides.
<0> HOW combine a kernel and a bootloader into one floppy image? ls boot_loader kernel > floppy_image ok ??
<2> (for the new people)
<2> if I want to call stat I need to be able to create the 'stat' structure. With the info from 'man stat' how can I break it down? Find the size of the entire structure and where in the alloc'd memory each element resides.
<2> anyone awake?
<2> with %eax = 17 and %ebx = 10, idivl %ebx generates a SIGFPE. why?
<4> node_6 can you post the code
<3> what is a SIGFPE?
<4> floating point exception signal
<5> is this channel exclusively x86 and 64 ***embly?
<6> some other types hang around
<5> illume, ok thanks
<7> node_6, try a cdq before your idivl
<4> cltd as well
<3> what does cdq do
<7> http://pdos.csail.mit.edu/6.828/2005/readings/i386/CWD.htm
<4> FPE would be generated if a value was left in the flags register before executing an arithmetic operation, wouldnt it?
<7> Harder to answer him when he leaves. :)
<2> Quartus: would cdq have the same effect as xorl %edx, %edx ?
<7> node_6, in your particular case I think it would result in the same value in ax after the idivl.
<8> how do you do sprite rotation, such as for a rotozoom effect, without trig?
<7> Perhaps with pre-computed trig lookup tables.
<8> that would still count as trig
<7> Oh, so this is a thought-exercise.
<7> aka homework? :)



<8> aka trying to figure out how 256b demos do rotation
<8> unless they have like a 16-entry 8bit trig lookup table, i find it unlikely that they use trig values at all
<7> Update (bug fix) http://retroforth.net/paste/?id=157
<7> Stable link for the RetroForth ANS layer: http://quartus.net/retro/retro-ans.fs
<7> I'll maintain updates there.
<7> guys, sorry. Wrong window. I'll just go beat my head on the desk for awhile :)
<9> *drinks another beer on Quartus' behalf*
<9> heh -- no sleep does that
<7> I can't complain of no sleep, it must be organic damage. :)
<9> thats worst *[hopes that no innocent spirits were injured during Quartus' organic epispodes] =]
<7> :)
<9> <--- vaca for 4 days so all smiles
<10> That is one fine book.
<10> Only took me a few evenings but it has been on my shelf for over a year waiting to be read.
<11> =]
<11> tessier: http://download.savannah.gnu.org/releases/pgubook/ ?
<12> Hello. I've got two pointers, and I wanna add +4 to both of them, but I can't use the register eax on both of them. Can I add +4 on another register?
<12> MOV DWORD PTR DS:[EAX+4],ECX+4 ;Error: invalid instruction operand. How would I make exc+4, too?!
<13> eeh, how could that work
<13> EAX+4 works because it's address calculation
<13> modrm
<12> ?
<13> ECX+4 in turn would be like, value arithmetic
<12> Yea, but I cna't have two eax right?
<13> eeh, it's not about the register
<13> do you know what that instruction does?
<13> or would do if it would work
<12> I've been learning only for three days.
<12> I really don't know much about this kidna thing.
<12> What instruction?
<13> say eax would have value 100 and ecx would have value 200, then that instruction would try to write to address 104 the doubleword 204
<13> is this what you wanted?
<12> Eax is a pointer, and ecx is too, in that example. i may be using it wrong tho. It works without the +4.
<13> yeah. In C terms, is the operation you are looking for like: int *a; int b; *(a+4) = b+4 ?
<13> s/a/eax/ & s/b/ecx
<12> I know a little c, but I don't understand.
<13> okay. So, you see that you are trying to move a doubleword with that instruction, right?
<12> doubleword?!
<12> Let me use pastebin, one sec!
<14> HighNeko: Every x86 arithmetic or move instruction do some `mathematical' operation. An exception: internal computing address of memory.
<12> http://rafb.net/paste/results/H6coPp83.html
<13> doubleword = DWORD = two words = 2x2 bytes = 4 bytes = 32 bits value
<14> HighNeko: `mov' moves, doesn't adds.
<13> HighNeko: we don't have to go any farther than that one instruction you pasted
<12> I'm really, honestly, not that smart! I'm getting confused!!!
<12> I kidna knew what a dword was, but now I know more.
<13> HighNeko: so, basically, are you trying to move the dword in address ECX+4 to the address EAX+4, OR are you trying to move the dword ECX+4 (value, not the value pointed to by that address) to the address EAX+4 ?
<12> hrm, let me think.
<13> you should know C, it would be a lot simpler for me to express the operation in C than in english
<12> ecx is address of value, I want to add. I want to add.... let me think!
<13> okay, do you know enough C to understand this: int *eax, *ecx; *eax = *ecx; ?
<12> * is dereference or soemthing.
<12> no I do'nt understand that :/
<13> yeah, *address is basically what [address] is in ***embly
<13> well, i think you are now trying to move a value directly between two memory locations, [ECX+4] to [EAX+4].
<12> maby o.O don't remember!
<13> so you don't know what you are trying to do and still asking how to do it?
<12> There's two memory locations. I want to change them both +4, and then add a value to one.
<12> I'm sorry, I've been up late today, and there's coffee downstairs. It's all I can think about!
<13> so you want to add 4 to the values in those memory locations?
<13> well then, let's see your code
<12> i want to add hex words to the address, but need to +4 everytime.
<12> That's all the code pretty much. it's jsut a dll.
<13> hmm, if you want to ADD something, you must use the ADD instruction.
<13> (or LEA in some cases, but let's not go that far)
<12> Let me get some coffee, and I'll think again. i'll give good detail! Brb. Thanks.
<12> I know lea, I learned that today! it changes to something of it doesn't compare or somethign right?!
<13> uhm, it's using the addressing logic to do almost general-purpose arithmetic
<13> or well, more precisely, handle some special cases in regular arithmetic, not just addressing
<13> but as I said, currently just focus on understanding the operand specifications, possible operands etc
<13> and not go as far as using LEA much.
<11> shghk
<13> d00zer: ?


Name:

Comments:

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






Return to #asm
or
Go to some related logs:

unmask quake1 gentoo
#mysql
#physics
Wno-unused-functions Wno-unused
apt-get install php6
#physics
#centos
#linux
how to join xgc
gentoo 4x6.bdf command not found



Home  |  disclaimer  |  contact  |  submit quotes