Page 2 of 3

Re: Advice/Support requested at OS Development

Posted: Tue Mar 24, 2009 12:35 pm
by ehenkes
I like languages
As a little gag, we use

Code: Select all

times 510-($-$$) hlt
as an alternative to "db 0", because at disassembling that makes sense.
I searched by Google for this version, and found this as the only search result: http://kldp.org/node/89199 (Korean?) :shock:

Re: Advice/Support requested at OS Development

Posted: Tue Mar 24, 2009 12:59 pm
by ehenkes
I think you misunderstood what the strcmp call does. It sets the carry flag (stc, jc works for jumping) if the strings are equal and clears it (clc, jnc works for jumping) if the strings are not equal. You appear to have taken out the entire functionality of the kernel's shell.
I hope that I really understood what 'strcmp' does. It looks, whether the command is known and directs the program to the corresponding subroutine. Otherwise the message is "command unknown". To my knowledge it does the same work without Carry Flag. Just go and try it. :D
Fix a few bugs
Could you be more specific, please? :)

Re: Advice/Support requested at OS Development

Posted: Tue Mar 24, 2009 3:56 pm
by Troy Martin
For example, the strcmp that doesn't compare. I can't think of anything else, though!

Re: Advice/Support requested at OS Development

Posted: Tue Mar 24, 2009 5:44 pm
by ehenkes
Perhaps you are right. I see your point, but it really performs in checking the instruction just by using the zero flag. If we need more, we will come back to your original code. :)

Re: Advice/Support requested at OS Development

Posted: Tue Mar 24, 2009 5:46 pm
by Troy Martin
I'm not sure, but I think jz == je as well.

Re: Advice/Support requested at OS Development

Posted: Tue Mar 24, 2009 6:10 pm
by Combuster
equality occurs when the difference is zero, so yes JE corresponds to the same opcode as JZ

Re: Advice/Support requested at OS Development

Posted: Tue Mar 24, 2009 7:14 pm
by Brendan
Hi,

The CMP instruction does exactly the same thing as the SUB instruction, except that the result is discarded. The same flags are set for the same reasons. Therefore, for "CMP 0x12, 0x12" the result would be zero and the Z flag is set. In a similar way the TEST instruction does exactly the same thing as the AND instruction, except that the result is discarded.

Intel define synonyms for some instructions (e.g. JE and JZ; JA and JNBE; REP and REPE) so that you can make your code more readable.

Note: NOP was originally a synonym for "XCHG eAX, eAX", and originally these instructions behaved the same. However, for "out-of-order" CPUs these instructions do not behave the same - "XCHG eAX, eAX" should make the CPU wait until previous instructions that modified eAX are completed, and NOP shouldn't. For most (all?) "out-of-order" CPUs, NOP has become an instruction (rather than a synonym) and "XCHG eAX, eAX" doesn't really exist.


Cheers,

Brendan

Re: Advice/Support requested at OS Development

Posted: Wed Mar 25, 2009 6:43 am
by Creature
Kevin wrote:Well, so there are already enough tutorials in English, no? ;)

Hm, Belgium... I've never seen a tutorial in Dutch or French - probably I wouldn't understand too much of the latter, but I might have chances with the former. I like languages, and that doesn't only include English. :)
Haven't seen any OSDev tuts in Dutch either, I've seen them in French though. Besides, Belgium has 3 national languages: Dutch, French and German. All of them are tought in school including English :P.

Re: Advice/Support requested at OS Development

Posted: Wed Mar 25, 2009 7:46 am
by Combuster
Creature wrote:Haven't seen any OSDev tuts in Dutch either
Dutchies are too good at English. :mrgreen:

Re: Advice/Support requested at OS Development

Posted: Wed Mar 25, 2009 8:15 am
by jal
Combuster wrote:
Creature wrote:Haven't seen any OSDev tuts in Dutch either
Dutchies are too good at English.
Not to mention that everything written in Dutch that concerns computers somehow looks to be aimed at digibeten and dummy's. I've seen things like 'cache' and 'CPU' (CVE anyone?) translated - it's ugly.


JAL

Re: Advice/Support requested at OS Development

Posted: Wed Mar 25, 2009 8:53 am
by Kevin
Creature wrote:Besides, Belgium has 3 national languages: Dutch, French and German. All of them are tought in school including English :P.
I'm aware of that (well, I didn't know that German is tought everywhere in Belgium), but as one of the Lowlevel admins (German OS-Dev community) I've obviously seen lots of German tutorials. ;)
jal wrote:Not to mention that everything written in Dutch that concerns computers somehow looks to be aimed at digibeten and dummy's. I've seen things like 'cache' and 'CPU' (CVE anyone?) translated - it's ugly.
I guess you call it ugly because you're not used to it. English words aren't any better per se.

By the way, in German I have experienced it the other way round: "Dummies" as you call them tend to say "Computer" whereas the more experienced more often use the German "Rechner".

Re: Advice/Support requested at OS Development

Posted: Wed Mar 25, 2009 8:57 am
by Solar
Simply because it's one syllable less, and techies tend to be lazy as hell. :-D

Re: Advice/Support requested at OS Development

Posted: Wed Mar 25, 2009 9:01 am
by Kevin
Hm, never thought about it that way... Might be true. But then, I also say "Festplatte"and not "hard disk", even though it's one syllable more. In the end, I don't think it's much more than a nice theory. ;)

Re: Advice/Support requested at OS Development

Posted: Wed Mar 25, 2009 9:27 am
by Solar
Roll around those words in your mouth and you'll realize that, the way you speak it, "Festplatte" also has only two syllables, and is easier to pronounce. (Don't tell me you actually pronounce the "-te" as individual syllable.)

Add to that how we techies have grown to hate those sales drones and management goons that have to use English vocabulary for everything... :twisted:

Re: Advice/Support requested at OS Development

Posted: Wed Mar 25, 2009 9:39 am
by Kevin
The final schwa in "Festplatte" might be unstressed, but it still makes a third syllable.

I wholeheartedly agree about hating the Schlipsträger language, though. This is the much better theory. ;)