[net.unix-wizards] A kernel trivia question

mrd (02/16/83)

Why is the initialization code icode[] in machdep.c rather than
in mch.s ?  It seems that it would have been simpler to put it
in mch.s, since this would have eliminated the need to translate
it into octal from assembler.

dyer (02/16/83)

Why is icode defined in machdep.c?

	Maybe because it's easy to refer to sizeof(icode)
	for the copyout with main.  Were it in mch.s
	(and not all machines have a mch.s), main would
	not have a handle on its size.  (I agree that there
	are ways to work around this.)

guy (02/17/83)

The only reason I can think of is that the only way to get sizeof(icode)
as a compile-time constant is to put it into a C array.  In System III,
however, it IS in the machine support; "szicode" is a separate variable set
from (location after icode) - icode.

				Guy Harris
				RLG Corporation
			(decvax!duke!mcnc!rlgvax!guy)