From mboxrd@z Thu Jan 1 00:00:00 1970 From: bjorn@mork.no (=?utf-8?Q?Bj=C3=B8rn_Mork?=) Date: Mon, 20 Apr 2015 18:29:12 +0200 Subject: Question about assembly in set bit function for x86 architecture In-Reply-To: <6508.1429544797@turing-police.cc.vt.edu> (Valdis Kletnieks's message of "Mon, 20 Apr 2015 11:46:37 -0400") References: <5534153C.4070303@gmail.com> <8ECAF1D8-6B44-4D53-B0F9-138AA6CBEC63@gmail.com> <6508.1429544797@turing-police.cc.vt.edu> Message-ID: <87bniircfb.fsf@nemi.mork.no> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Valdis.Kletnieks at vt.edu writes: > On Sun, 19 Apr 2015 19:08:17 -0400, Nicholas Krause said: > >> The reason I am asking is that is assembly worth my time to learn for this >> part of the kernel, I understand it's use in boot code but outside of that and >> cache memory lines in architecture directories there is very little, 95 percent >> of the kernel is written in C. In addition due to this the only practical >> reason I can thing of is for debugging, how useful is assembly for kernel >> debugging is my other question about this topic. > > We're not going to bail you out here, Nick. Either learn enough assembly > to answer your question, or don't obsess over one line of code and assume > it works. It's not necessary to limit this advice by language or specific lines of code. NO part of the kernel can be understood without investing some time trying to learn. But fear not - there is a shortcut available for those (assuming there might be more than one) who refuse to learn: Assume it works. OK, I'll admit taking that route more than once myself :-) Bj?rn