Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!apple!apple.com!chewy From: chewy@apple.com (Paul Snively) Newsgroups: comp.lang.lisp Subject: Re: Apple CL incompatible with Radius accelorater Message-ID: <4812@internal.Apple.COM> Date: 20 Oct 89 16:58:51 GMT References: <856woodl@yvax.byu.edu> Sender: usenet@Apple.COM Organization: Apple Computer, Inc. Lines: 82 In article <856woodl@yvax.byu.edu> woodl@yvax.byu.edu writes: > I just installed a Radius 16 mhz accelorater board in my SE and find that > Apple Allegro CL will not boot. I get the bomb!, error=11. So far, Radius > blames Apple, and I haven't received a reply back from my AppleLink query to > Apple. I don't suppose anyone out there has had any experience? Any ideas > would be appreciated. All my other software has run fine, and the increase > in speed has been very worthwhile. > > Thanks > > - Larry Wood, Brigham Young University, WoodL@BYUVAX.bitnet Yup, it's our problem. Put this patch in your INIT.LISP file: (in-package "CCL") (defun validate-fp-handler (handler) "If the HANDLER argument appears valid, return it. Otherwise, make a new one which Does The Right Thing. Note that the kernel will restore system floating-point exception handlers on exit, so we don't worry about that here." (let* ((old-addr (%ptr-to-int handler)) (words (list #o026417 ; move.l sp,-(a6) #o171447 ; fsave -(sp) #o027400 ; move.l d0,-(sp) #o027401 ; move.l d1,-(sp) #o070000 ; moveq #0,d0 #o010057 ; move.b 9(sp),d0 #o000011 #o004367 ; bset #27,8(sp,d0.w) #o000033 #o000010 #o171000 ; fmove.l fpsr,d0 #o124000 #o031074 ; move.w #$3400,d1 #o032000 #o141100 ; and.w d0,d1 #o063010 ; bne.s @1 #o021037 ; move.l (sp)+,d1 #o020037 ; move.l (sp)+,d0 #o171537 ; frestore (sp)+ #o541166 ; addq #4,a6 #o047163 ; rte #o027136 ; @1: move.l (a6)+,sp #o041247 ; clr.l -(sp) #o171537 ; frestore (sp)+ #o171000 ; fmove.l d0,fpsr #o104000 #o047371 ; jmp (logand (ash old-addr -16) #xff) (logand old-addr #xffff))) (len (length words))) (unless (= (%get-signed-word handler) (car words)) (setq handler (%register-trap #xa11e 384 (* 2 len))) ;(_Newptr:d0 (* 2 len):a0) (dotimes (i len) (%put-word handler (pop words) (+ i i)))) handler)) (defun ccl-using-fpu-p () (not (= 0 (%get-byte (%get-ptr (%int-to-ptr #x904)) #x-130)))) (when (ccl-using-fpu-p) (let* ((addr (%int-to-ptr #xc8))) (%put-ptr addr (validate-fp-handler (%get-ptr addr)))) t) Hope this helps! __________________________________________________________________________ Just because I work for Apple Computer, Inc. doesn't mean that they believe what I believe or vice-versa. __________________________________________________________________________ C++ -- The language in which only friends can access your private members. __________________________________________________________________________