On Sunday 22 June 2008 03:08:08 am Basile STARYNKEVITCH wrote: > Star Liu wrote: > > Greetings! > > I'm a newbie in assembly language programming, for I worked as a C# > > programmer on microsoft platform in the past years, but now I want to > > know clearly how operating system and softwares are executed, so I > > begin to learn assembly language programming, I have learned some 32 > > bit asm coding, and want to move to 64 bit coding. Is there any good > > toturial to follow? and which assembler should I use? > > I suggest avoiding coding in assembler. In 2008, this has no sense. If > you really need some strange machine instruction, use the asm statement > inside a GCC-compiled code. > > -- > Basile STARYNKEVITCH http://starynkevitch.net/Basile/ > email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359 > 8, rue de la Faiencerie, 92340 Bourg La Reine, France > *** opinions {are only mines, sont seulement les miennes} ***
If you want to write an operating system, *some* assembly is absolutely required -- getting the A20 gate open, getting into protected mode, and so forth. Yes, you can use GCC's inline assembly to do that (and, indeed, that's probably better). Logically, however, before you can use inline assembly, you must know how to use assembly at all. I agree that using assembly in any situation except the most extreme or unusual is generally not a good idea. However, that is no reason not to learn it. You can learn from it, at least, how the machine works -- so when your C code does something you didn't expect, you can understand it a little easier. I'm not an expert, just a hobbyist. Don't take my word for it ;). - Jack Mudge [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

