@# Quotes DB     useful, funny, interesting





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



Comments:

<0> keex: anyways, this is interesting. please ask for more info if you don't understand something
<1> :) thank you lindi-
<2> yuriks, this is what I did: http://rafb.net/p/TYLcXF24.html
<3> should I have dropped the = on eax?
<2> no. but I don't recall that syntax to 100%, admittedly. just rtfm ..
<4> yuriks: you're using "a" twice.
<4> that's wrong
<4> since you lead gcc to think that you need two different operands that qualify as "a"
<4> the second should be "0"(*eax), to make it alias 0th operand
<4> also, remove the __volatile__ thingie. you don't need it here.
<3> mwk: so, fixing those, it's all ok? that tutorial used %%eax on some register is that anything special or just a typo?
<4> it's needed
<4> % is meta-character in asm string, like in printf
<3> ah
<4> you need to write it twice to p*** it to ***embler
<4> eg. %0 returns ***embler-friendly version of operand 0



<3> yeah, ok got it
<3> thanks wobster and mwk
<3> only way to test/set upper half of eflags is to push it to the stack, correct?
<1> lindi-: are you still there?
<0> sure
<4> yuriks: right
<3> peh
<0> keex: any problems?
<1> not particularily
<1> there is this Interrupt 1Ch
<1> is it permanently called?
<4> yuriks: well, actually, there are some circumstances when some of them are modified
<1> or do I have to activate it?
<4> cli/sti with CPL > IOPL and PVI/VME on modify VIF
<4> and each instruction clears RF after successful execution
<1> 1Ch is the Timer - Interrupt
<3> mwk: ah, I want to check for CPUID on bit 21
<1> because you used interrupt 08
<5> interrupt 8!?!?
<2> keex, leave realmode for pete's sake
<5> ew!!
<1> wobster: what else are you suggesting?
<4> for ID, you're stuck with pushf/popf
<1> btw, WHAT is int 08 ?
<4> or interrupts and iret, but that's even worse
<1> mwk: I find them quite neat at the moment
<1> mwk: especially within embedded systems together with HLT
<4> yeah, but if you just want to mess with flags, it's a bad idea probably
<1> mwk: then how else do you get the whole program to halt, or do nothing and wait for some action?
<1> lindi-: ?
<0> ...
<1> lindi-: so what is the difference between int 08h and int1Ch?
<0> keex: int1Ch is the dos interrupt handler that handler of int 08h calls?
<0> (i'm guessing)
<1> aaah, ok
<0> keex: 08h is what hardware generates
<0> and the handler then does "int 0x1C" too
<1> lindi-: ok, and is int 1c really called every 54.9 msec ?
<0> keex: that i don't know
<0> keex: but you can control the rate of int 0x08
<1> "; set timer to normal speed"
<0> yep
<0> 0xffff translates to 18.2 Hz
<0> 0x7fff would be 36.4 Hz if iirc
<1> lindi-: I am trying to get is as slow as possible :)
<0> 18.2 is the slowest you can get i think
<4> yeah
<0> keex: what are you writing btw?
<1> a clock
<1> its a university student project for learning purposes
<0> keex: does the course have a web page btw?
<1> other students have this moron approach of looping and constantly querying the time until a second changes..
<1> no..
<0> and you are supposed to do it in ***embler?
<1> lindi-: yes
<1> lindi-: I now started liking ***embler quite a lot
<0> i wonder what university teaches x86 ***embler ;)
<0> i've only used mips and sparc ***embler at univerity courses
<6> my course "teaches" it
<6> i dont attend the lectures tho, because i already know x86 ***embler for the most part (i.e. enough to do whatever i want to do), and stuff i dont, i always have http://woot.info to educate me! :P
<0> linkd: it is surprisingly hard to find info about for example single stepping in realmode



<1> true :D
<0> i couldn't find any DFSG-free 16-bit debuggers for realmode dos either
<0> so writing http://iki.fi/lindi/tracer1.asm took a lot of time
<1> lindi-: why did you write these?
<1> lindi-: was it a university project?
<0> keex: no a hobby project to get linux running on nokia 9110
<1> heh
<1> cool!
<0> keex: involves reverse engineering how the bios stuff works
<1> lindi-: are you here frequently?
<0> keex: my computer is running 24/7 and i keep the irc client here to see if there are new messages for me
<0> so yes
<1> ok..
<1> because I am leaving now... unless I get stuck AGAIN, then I might come back, but until then, which is an undefinite point in time, cu later :)
<0> heh, ok
<1> oh and thanks to all here for constructive comments and help!
<3> peh
<3> my CPUID function didn't work
<3> http://rafb.net/p/Hhz27P30.html
<3> see anything wrong with it?
<3> the problem is after the actual cpuid executes (I checked it on a debugger)
<3> I'm just getting an empty vendor string =P
<4> ...
<4> lines 24-35
<4> you're masking appropriate parts of registers, but you forgot to shift them right
<4> .sdrawkcab meht tog uoy ,osla
<3> mwk: yeah
<3> I noticed that shortly after I asked =P
<3> how to solve a problem: ask it to someone even if they don't answer you
<3> mwk: and then I had to play "rearrange the letters" =]
<3> Genu ineI ntel uneGntelineI
<3> =P
<7> what linker should I use with nasm if I want to write 16bit DOS MZ executables?
<7> I have GNU/ld which came with mingw, but it's looking for __crtStartUp or some such
<8> hi
<5> hi, how would an extremely large number be calculated using a 32bit processor?
<4> split in 32-bit parts
<5> is there a maximum size a number can be
<4> yeah, it needs to fit in RAM
<5> for example, if I was trying to generate mersenne primes..
<4> or swap
<5> hmm
<5> im new to ***embly, how would a large number such as 65540 be stored?
<5> you see that number is too large for one 32bit register, yes?
<9> it would be stored as a longint
<9> 32bit, 4 bytes
<9> depending on architecture
<5> hmm
<5> ok, bad example
<5> what about something extremely large
<5> how would you put that number into memory using ***embler?
<4> ummm
<4> 65540 fits in 32 bits
<4> anyway, THINK.
<4> number is a string of digits
<4> base-10
<4> that's how we use them
<4> for computers, digits can be of arbitrary size
<4> best would be base-2^32, since that's the biggest we can fit in registers
<4> and that's it -- numbers are stored as strings of 32-bit chunks
<5> oh hmm
<5> yes that will fit in 32bits
<5> im just thinking of c again and the signed integers
<5> so if I had the number 123456789123456789
<5> how would that be put into memory?
<5> this is what I have trouble understanding
<5> you can't possibly do mov eax, 123456789123456789
<5> wouldn't that be some kind of overflow?
<10> what is so troublesome about that?
<10> of course it doesnt fit in one register
<10> so you just have to split it in two parts
<4> well, in C, there's long long int type for that
<4> which is 64-biyt
<4> it's pair of 32-bit registers


Name:

Comments:

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






Return to #asm
or
Go to some related logs:

#gentoo
modprope ndiswrapper bootup
pydcop reference
debian vpopmail howto
#fedora
#php
#linux
openbox+osx
kasadkad
z35 suse10



Home  |  disclaimer  |  contact  |  submit quotes