turner@daisy.UUCP (Jim Turner) (03/17/88)
FLAME ON why, oh why is there VAX assembly code in andrew, I (silly me) thought that we were dealing in PORTABLE software FLAME OFF anywho, has anyone thought of rewritting the classentry code into C, so that us poor non-VAX programmers could use andrew or am I missing something obvious (like a brain ?) -- Laissez les bons temps rouler - Queen Ida ...{decwrl|ucbvax}!imagen!atari!daisy!turner (James M. Turner) Daisy Systems, 700 E. Middlefield Rd, P.O. Box 7006, Mountain View CA 94039-7006. (415)960-0123
zs01+@andrew.cmu.edu (Zalman Stern) (03/23/88)
> *Excerpts from: 17-Mar-88 andrew toolkit - flame on Jim Turner@daisy.UUCP* > *(562)* > FLAME ON > why, oh why is there VAX assembly code in andrew, I (silly me) thought > that we were dealing in PORTABLE software > FLAME OFF In the future, you might try finding out what someone's code does before flaming them. We do provide this routine for IBM RTs, mc68000 (Sun mnemonics), not just VAXen. The UNIX kernel is often called portable despite the fact that it contains a small amount of very hardware specific assembly code (i.e. locore.s). Both the kernel and X11 contain a large amount of hardware specific C code as well which is not going to "just run" on any machine lying arround. > anywho, has anyone thought of rewritting the classentry code into C, so > that us poor non-VAX programmers could use andrew or am I missing something > obvious (like a brain ?) > -- > Laissez les bons temps rouler - Queen Ida > ...{decwrl|ucbvax}!imagen!atari!daisy!turner (James M. Turner) > Daisy Systems, 700 E. Middlefield Rd, P.O. Box 7006, > Mountain View CA 94039-7006. (415)960-0123 Unfortunately, C cannot do what this code does. The code in question (classentry.s) is part of our dynamic loading system. When you call a routine that is in a module that is not yet loaded, it calls classentry instead. Classentry saves the routine's arguments and calls C code which dynamically load the module. After the module is loaded, calssentry restores the original arguments, and "jumps" to the correct routine in the newly loaded module. This is a wonderful example where 30 lines of assembly code (and 50-100 lines of repeated data declarations) do the job correctly and efficiently. I doubt any amount of C code will work. (If it does, it won't be any more portable than the assembly code.) I would much prefer to see people work out this code for other architectures than complain that our code is not portable. The reason we only support three architectures is because these are the only three kinds of machines we have. (Actually, I had a version for the Intel 8088, but it didn't seem particularly useful in this distribution.) If you are having problems working out this code for your favorite architecture, don't hesitate to send me mail. Sincerely, Zalman Stern Internet: zs01+@andrew.cmu.edu Usenet: I'm soooo confused... Information Technology Center, Carnegie Mellon, Pittsburgh, PA 15213-3890