Index: /branches/event-ide/ccl/examples/cocoa/currency-converter/HOWTO_files/pages/building_ui.html
===================================================================
--- /branches/event-ide/ccl/examples/cocoa/currency-converter/HOWTO_files/pages/building_ui.html	(revision 8052)
+++ /branches/event-ide/ccl/examples/cocoa/currency-converter/HOWTO_files/pages/building_ui.html	(revision 8053)
@@ -17,5 +17,5 @@
       converter application is to construct the user
       interface. Apple's
-      tutorial <a href="http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/chapter03/chapter_3_section_1.html">
+      tutorial <a href="http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/05View/chapter_5_section_1.html#//apple_ref/doc/uid/TP40000863-CH7-SW1"> 
       describes in detail</a> how to do this.</p>
 
Index: /branches/event-ide/ccl/examples/cocoa/currency-converter/HOWTO_files/pages/building_ui_tiger.html
===================================================================
--- /branches/event-ide/ccl/examples/cocoa/currency-converter/HOWTO_files/pages/building_ui_tiger.html	(revision 8052)
+++ /branches/event-ide/ccl/examples/cocoa/currency-converter/HOWTO_files/pages/building_ui_tiger.html	(revision 8053)
@@ -222,5 +222,5 @@
       <p>When you first enter the text for a label, the label may not
       be wide enough to show it all. In that case, you'll see only
-      part of the text in the label. You can resise the label to make
+      part of the text in the label. You can resize the label to make
       the full text visible. Click the label to select it. Notice the
       small blue dots that surround it. Grab a dot on the left side
@@ -228,4 +228,359 @@
       see the entire text.</p>
 
+      <div class="section-head">
+        <h2>Change Text Field Attributes</h2>
+      </div>
+      
+      <p>The first two text fields accept user input; the last
+      displays the result of the conversion. We want the first to text
+      fields to be editable, so users can enter the values to use in
+      the conversion. We don't want the last field to be editable, but
+      we do want users to be able to copy text from it.</p>
+
+      <p>We can control all this behavior using text-field
+      attributes, configurable in the Inspector.</p>
+
+      <ol>
+        <li><p>Select the first text field</p></li>
+        <li><p>Choose "Show Inspector" from the "Tools" menu</p></li>
+        <li><p>Make sure "Attributes" is selected in the pull-down
+        menu at the top of the Inspector window</p></li>
+        <li><p>Ensure that the "Editable" and "Enabled" boxes are
+        checked in the "Attributes" display of the Inspector window</p></li>
+        <li><p>Repeat this process for the second text field</p></li>
+        <li><p>Finally, repeat it again for the last text field, but
+        this time make sure the "Editable" box is unchecked</p></li>
+      </ol>
+
+      <div class="section-head">
+        <h2>Add a Button</h2>
+      </div>
+      
+      <p>Now we add a button that activates the currency conversion.</p>
+      
+      <ol>
+        <li><p>Drag a Button object from the palette and drop it on
+            the window</p>
+          <p><div class="inline-image">
+              <img src="../images/ibwin-tiger13.jpg"alt="" 
+                   border='0'/>
+            </div>
+        </p></li>
+        <li><p>Double-click the button and change its title to "Convert"</p>
+          <p><div class="inline-image">
+              <img src="../images/ibwin-tiger14.jpg"alt="" 
+                   border='0'/>
+            </div>
+        </p></li>
+        <li><p>Select the button and then choose "Attributes" from
+        the pull-down menu at the top of the Inspector window. Almost
+        halfway down the "Attributes" view of the Inspector window,
+        find the "Key Equiv" field. Choose "Return" from the pulldown
+        menu in that field.</p>
+          <p><div class="inline-image">
+              <img src="../images/ibwin-tiger15.jpg"alt="" 
+                   border='0'/>
+            </div>
+        </p>
+        <p>When you choose "Return", InterfaceBuilder enters "\R" in
+        the text field for the Key Equivalent. Now when a user hits
+        the "Return" key, your application will behave as if they had
+        clicked the "Convert" button.</p></li>
+      </ol>
+
+      <div class="section-head">
+        <h2>Add a Separator</h2>
+      </div>
+      
+      <p>Now add a separator line to visually group the text fields
+      together. Drag a separator line from the palette and drop it
+      above the button.</p>
+      
+      <p><div class="inline-image">
+          <img src="../images/ibwin-tiger16.jpg"alt="" 
+               border='0'/>
+        </div>
+      </p>
+
+      <p>Drag the ends of the separator line until it spans a
+        visually pleasing width. As always, you can use the blue
+        guidelines that InterfaceBuilder displays to adjust the size
+        and position of the line and other elements to conform to
+        Apple's Human Interface Guidelines.</p>
+
+      <div class="section-head">
+        <h2>Set Up the Menus</h2>
+      </div>
+
+      <p>InterfaceBuilder creates the standard menus for a new
+      application, but it doesn't know the name of the
+      application. Consequently, the Application menu and several menu
+      items use the name "NewApplication" where they should use the
+      name of your application. Change the text of these items so that
+      they read "Currency Converter" instead of "NewApplication".</p>
+
+      <ol>
+        <li><p>Double-click the text "NewApplication" in the
+        application menu of your application's menubar. Change the
+        text to "Currency Converter".</p>
+          <p><div class="inline-image">
+              <img src="../images/ibwin-tiger17.jpg"alt="" 
+                   border='0'/>
+            </div>
+          </p>
+        <p><em>NOTE:</em> This change isn't really enough to get your
+        application to display the right name for the Application menu
+        when it's launched; the <a href="build_app.html">section</a>
+        on building the application explains how to make sure the
+        correct name appears.</p></li>
+        <li><p>Repeat this process for each menu item where the name
+        "NewApplication" appears. Using the same method you used to
+        change the name of the application menu, edit the "About
+        NewApplication" item, the "Hide NewApplication" item, and the
+        "Quit NewApplication" item in the application menu. Then edit
+        the "NewApplication Help" item in the "Help" menu.</p></li>
+      </ol>
+
+      <div class="section-head">
+        <h2>Tighten Up the Window Layout</h2>
+      </div>
+
+      <p>InterfaceBuilder provides layout tools with which you can
+      easily clean up the layout of a UI window and ensure it
+      conforms to Apple's user interface guidelines.</p>
+
+      <ol>
+        <li><p>Select the "Exchange Rate" text label. Then
+        Shift-click the other two labels to include them in the
+        selection (actually, it doesn't matter which label you select first).</p></li>
+        <li><p>Choose "Layout" > "Size to Fit" to shrink the labels
+        to the smallest sizes that still show all the text</p></li>
+        <li><p>Choose "Layout" > "Alignment" > "Align Right Edges" to
+        line up the right sides of the labels</p></li>
+        <li><p>With all three labels still selected, drag them up and
+        to the left. Release them when the blue guidelines show at
+        the top and left side of the window.</p></li>
+        <li><p>Now select all three text fields. You can click one of
+        them, then Shift-click to add the others to the
+        selection. Drag them up and left, toward the labels. Again,
+        release them when the blue guide line appears to show you the
+        proper distance from the labels. A guide line also appears to
+        show you when the fields are vertically aligned with the
+        center label.</p></li>
+        <li><p>Next, grab the separator line and move it up and to the
+        left. Release it when its left edge is aligned with the left
+        edge of the bottom label, and its top is the recommended
+        distance from the bottom label and its text field. Then drag
+        the right end of the separator line to resize it until its
+        right edge is aligned with the right edge of the bottom text
+        field.  Again, guide lines show when you have found the proper
+        distances.</p></li>
+        <li><p>Grab the button and move it up and left, again using
+        the guide lines to help you find a good position.</p></li>
+        <li><p>Finally, resize the window. When the blue guide lines
+        appear on the right and bottom of the window, it's the right
+        size for its contents.</p></li>
+      </ol>
+
+      <p>Now your application window should look something like the
+      one in the illustration:</p>
+
+      <p><div class="inline-image">
+          <img src="../images/ibwin-tiger18.jpg"alt="" 
+               border='0'/>
+        </div>
+      </p>
+
+      <div class="section-head">
+        <h2>Enable Tabbing Between Text Fields</h2>
+      </div>
+
+      <p>Users generally expect to be able to use the Tab key to move
+      from one text field to the next in a dialog
+      box. InterfaceBuilder enables you to specify the tanning order
+      in text fields.</p>
+
+      <ol>
+        <li><p>Choose "Layout" > "Keyboard Navigation" > "Show
+        Keyboard Check". InterfaceBuilder displays a set of small
+        icons that identify UI elements that can respond to key
+        events.</p></li>
+        <li><p>Select the "Exchange Rate" text field (the field, not
+        the label) and then choose "Layout" > "Keyboard Navigation" >
+        "Make Initial First Responder". A small "1" icon appears in
+        the text field to show that when the application launches,
+        that field receives keyboard events.</p></li>
+        <li><p>Control-drag from the "Exchange Rate" field to the
+        "Dollars" field. InterfaceBuilder shows the "Connections"
+        Inspector, and, because Keyboard Check is enabled,
+        automatically selects the "nextKeyView" outlet. Click the
+        "Connect" button in the Inspector window to confirm.</p></li>
+        <li><p>Repeat the previous steps to connect the "Dollars"
+        field back to the "Exchange Rate" field. That way, tabbing
+        moves the insertion point from the "Exchange Rate" field to
+        the "Dollars" field, and then back to the "Exchange Rate"
+        field. Control-drag from the "Dollars" field to the "Exchange
+        Rate" field, then click "Connect" to confirm.</p></li>
+      </ol>
+
+      <p>We don't enable tabbing into the "Amount" field because it's
+      not an editable field; it's used only to show the result of a
+      conversion.</p>
+
+      <div class="section-head">
+        <h2>Set Up the Classes Used In the User Interface</h2>
+      </div>
+
+      <p>The visual elements of your application's user interface are
+      all ready now. The last thing you must do is create descruptions
+      of any custom classes used by the application when users
+      interact with the interface.</p>
+
+      <p>When a user clicks the "Convert" button, it should send a
+      message to a custom class that causes the conversion to take
+      place, and the result to be displayed in the "Amount" field. In
+      order for the application to connect the user interface to
+      classes that perform these actions, you must add descriptions of
+      your classes to the nibfile. Fortunately, InterfaceBuilder can
+      create class descriptions and save them in the nibfile for
+      you.</p>
+
+      <div class="section-head">
+        <h3>ConverterController</h3>
+      </div>
+
+      <p>ConverterController is the <a href="http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/02Essence/chapter_2_section_4.html#//apple_ref/doc/uid/TP40000863-CH3-SW4">controller</a> class that the user
+      interface communicates with directly when the "Convert" button
+      is pressed. Create a description of the ConverterController
+      class, and then create an instance of it.</p>
+
+      <ol>
+        <li><p>In InterfaceBuilder's "CurrencyConverter.nib" window,
+        click the "Classes" tab. The window shows a browser view of
+        all available Objective-C classes:</p>
+        <p><div class="inline-image">
+          <img src="../images/ibwin-tiger19.jpg"alt="" 
+               border='0'/>
+        </div></p>
+        </li>
+        <li><p>Control-click the "NSObject" entry in the browser, and
+        choose "Subclass NSObject" from the popup
+        menu. InterfaceBuilder creates a new entry initially called
+        "MyObject". Change the name from "MyObject" to "ConverterController".</p></li>
+        <li><p>Select the "ConverterController" class in the browser,
+        then activate the Inspector window and choose "Attributes"
+        from the popup menu at the top of the Inspector. At the
+        bottom of the "Attributes" view is a list of actions or
+        outlets. Select "Outlets", and use the "Add" button to add
+        four fields:</p>
+        <p><div class="inline-image">
+          <img src="../images/ibwin-tiger20.jpg"alt="" 
+               border='0'/>
+        </div></p>
+        <p>Rename these four fields to: "amountField", "dollarField",
+        "rateField", and "converter":</p>
+        <p><div class="inline-image">
+            <img src="../images/ibwin-tiger21.jpg"alt="" 
+                 border='0'/>
+        </div></p></li>
+        <li><p>Now add the action that is triggered when the
+        "Convert" button is pressed: switch to the Actions view and
+        use the "Add" button to add a new action:</p>
+        <p><div class="inline-image">
+            <img src="../images/ibwin-tiger22.jpg"alt="" 
+                 border='0'/>
+        </div></p>
+        <p>Change the name of the action from "myAction:" to "convert:"</p></li>
+        <li><p>Now create an instance of the ConverterController
+        class. In the browser, Right-click the ConverterController
+        class and choose "Instantiate ConverterController". The
+        browser view automatically switches to the Instances view to
+        show you the newly-created instance of ConverterController as
+        a blue box icon. There is a small yellow flag next to the
+        ConverterController instances to show that it has outlets
+        that are not connected to anything. In our final step, we'll
+        create the correct connections for the instance's outlets,
+        which will enable the application to send messages correctly
+        to the objects that implement its behavior.</p></li>
+      </ol>
+
+      <div class="section-head">
+        <h3>Converter</h3>
+      </div>
+
+      <p>Converter is
+      the <a href="http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/02Essence/chapter_2_section_4.html#//apple_ref/doc/uid/TP40000863-CH3-SW4">model</a>
+      class that implements the actual conversion code. Create a
+      description of the Converter class, and then create an
+      instance of it. Repeat the steps you used to create the
+      ConverterController class and instance to create a Converter
+      class and instance:</p>
+
+      <ol>
+        <li><p>Switch to the browser view in the
+        "CurrencyConverter.nib" window.</p></li>
+        <li><p>Control-click NSObject and choose "Subclass NSObject"
+        from the resulting popup menu.</p></li>
+        <li><p>Change the name of the newly-created class from
+        "MyObject" to "Converter"</p></li>
+        <li><p>Control-click the "Converter" class and choose
+        "Instantiate Converter" to create an instance of the
+        Converter class.</p></li>
+      </ol>
+
+      <p>The model class, "Converter", has no outlets or actions, so
+      you don't need to add anything to it before instantiating
+      it. Your code will implement a conversion method, but
+      InterfaceBuilder doesn't need to know about it; the "convert:"
+      method in your code will know everything it needs to about the
+      "Converter" class. You just need to create the class
+      description and the instance so that your application will
+      start up with the correct objects created and connected.</p>
+
+      <div class="section-head">
+        <h3>Connecting the Outlets</h3>
+      </div>
+
+      <p>The final step in setting up the user interface is
+      establishing connections between the outlets and objects in the
+      interface, so that messages are sent from the user interface to
+      the correct objects.</p>
+
+      <ol>
+        <li><p>Connect the "Convert" button to the
+        "ConverterController" instance. Control-drag from the
+        "Convert" button to the "ConverterController" instance. Make
+        sure the "convert:" action is selected in the "Target/Action"
+        view of the Inspector window, then click the "connect" button
+        to confirm.</p></li>
+        <li><p>Connect the "ConverterController" instance to text
+        fields. Control-drag from the "ConverterController" instance
+        to the "Exchange Rate" field. Select "rateField" in the
+        "Outlets" view of the Inspector window and click "connect" to
+        confirm. Then repeat this process, connecting "dollarField"
+        to the "Dollars" text field, and "amountField" to the
+        "Amount" field.</p></li>
+        <li><p>Finally, connect the "ConverterController" to the
+        "Converter" instance. Control-drag from the
+        "ConverterController" instance to the "Converter"
+        instance. Select the "converter" outlet in the Inspector
+        window and click "connect" to confirm.</p></li>
+        <li><p></p></li>
+      </ol>
+
+      <p>The nibfile now contains descriptions of the custom classes
+      that your code will implement, including connections between
+      their outlets and the objects with which they must
+      communicate. You can save the nibfile and proceed to write the
+      code that implements their behavior.</p>
+
+      <p>You can continue now with the section on <a href="create_lisp.html">"Creating a Lisp File"</a>.</p>
+
+
+
+    </div>
+
+    <div class="nav">
+      <p><a href="../../HOWTO.html">start</a>|<a href="making_project.html">previous</a>|<a href="create_lisp.html">next</a></p>
     </div>
   </body>
Index: /branches/event-ide/ccl/level-0/X86/x86-array.lisp
===================================================================
--- /branches/event-ide/ccl/level-0/X86/x86-array.lisp	(revision 8052)
+++ /branches/event-ide/ccl/level-0/X86/x86-array.lisp	(revision 8053)
@@ -217,27 +217,27 @@
   (jmp-subprim .SParef2))
 
-(defx86lapfunction %aref3 ((array 0) (i arg_x) (j arg_y) (k arg_z))
+(defx86lapfunction %aref3 ((array 8) #|(ra 0)|# (i arg_x) (j arg_y) (k arg_z))
   (check-nargs 4)
+  (pop (% ra0))
   (pop (% temp0))
   (discard-reserved-frame)
+  (push (% ra0))
   (jmp-subprim .SParef3))
 
-(defx86lapfunction %aset2 ((array 0) (i arg_x) (j arg_y) (newval arg_z))
+(defx86lapfunction %aset2 ((array 8) #|(ra 0)|# (i arg_x) (j arg_y) (newval arg_z))
   (check-nargs 4)
+  (pop (% ra0))
   (pop (% temp0))
   (discard-reserved-frame)
+  (push (% ra0))
   (jmp-subprim .SPaset2))
 
-(defx86lapfunction %aset3 ((array 8) (i 0) (j arg_x) (k arg_y) (newval arg_z))
+(defx86lapfunction %aset3 ((array 16) (i 8) #|(ra 0)|# (j arg_x) (k arg_y) (newval arg_z))
   (check-nargs 5)
+  (pop (% ra0))
   (pop (% temp0))
   (pop (% temp1))
   (discard-reserved-frame)
+  (push (% ra0))
   (jmp-subprim .SPaset3))
 
-
-
-
-
-  
-
Index: /branches/event-ide/ccl/level-0/X86/x86-io.lisp
===================================================================
--- /branches/event-ide/ccl/level-0/X86/x86-io.lisp	(revision 8052)
+++ /branches/event-ide/ccl/level-0/X86/x86-io.lisp	(revision 8053)
@@ -24,5 +24,5 @@
   (movq (@ (% :rcontext) x8664::tcr.errno-loc) (% imm1))
   (movslq (@ (% imm1)) (% imm0))
-  (movss (% fp0) (@ (% imm1)))
+  (movss (% fpzero) (@ (% imm1)))
   (negq (% imm0))
   (box-fixnum imm0 arg_z)
Index: /branches/event-ide/ccl/level-0/X86/x86-misc.lisp
===================================================================
--- /branches/event-ide/ccl/level-0/X86/x86-misc.lisp	(revision 8052)
+++ /branches/event-ide/ccl/level-0/X86/x86-misc.lisp	(revision 8053)
@@ -253,7 +253,7 @@
   (trap-unless-typecode= ptr x8664::subtag-macptr)
   (call-subprim .SPgetu64)
-  (macptr-ptr ptr ptr)
+  (macptr-ptr ptr imm2)
   (unbox-fixnum offset imm1)
-  (movq (% imm0) (@ (% ptr) (% imm1)))
+  (movq (% imm0) (@ (% imm2) (% imm1)))
   (restore-simple-frame)
   (single-value-return))
@@ -266,7 +266,7 @@
   (trap-unless-typecode= ptr x8664::subtag-macptr)
   (call-subprim .SPgets64)
-  (macptr-ptr ptr ptr)
+  (macptr-ptr ptr imm2)
   (unbox-fixnum offset imm1)
-  (movq (% imm0) (@ (% ptr) (% imm1)))
+  (movq (% imm0) (@ (% imm2) (% imm1)))
   (restore-simple-frame)
   (single-value-return))
@@ -448,10 +448,10 @@
 
 (defx86lapfunction %atomic-incf-ptr ((ptr arg_z))
-  (macptr-ptr ptr ptr)
-  @again
-  (movq (@ (% ptr)) (% rax))
+  (macptr-ptr ptr imm2)
+  @again
+  (movq (@ (% imm2)) (% rax))
   (lea (@ 1 (% rax)) (% imm1))
   (lock)
-  (cmpxchgq (% imm1) (@ (% ptr)))
+  (cmpxchgq (% imm1) (@ (% imm2)))
   (jne @again)
   (box-fixnum imm1 arg_z)
@@ -459,11 +459,11 @@
 
 (defx86lapfunction %atomic-incf-ptr-by ((ptr arg_y) (by arg_z))
-  (macptr-ptr ptr ptr)
-  @again
-  (movq (@ (% ptr)) (% rax))
+  (macptr-ptr ptr imm2)
+  @again
+  (movq (@ (% imm2)) (% rax))
   (unbox-fixnum by imm1)
   (add (% rax) (% imm1))
   (lock)
-  (cmpxchgq (% imm1) (@ (% ptr)))
+  (cmpxchgq (% imm1) (@ (% imm2)))
   (jnz @again)
   (box-fixnum imm1 arg_z)
@@ -472,10 +472,10 @@
 
 (defx86lapfunction %atomic-decf-ptr ((ptr arg_z))
-  (macptr-ptr ptr ptr)
-  @again
-  (movq (@ (% ptr)) (% rax))
+  (macptr-ptr ptr imm2)
+  @again
+  (movq (@ (% imm2)) (% rax))
   (lea (@ -1 (% rax)) (% imm1))
   (lock)
-  (cmpxchgq (% imm1) (@ (% ptr)))
+  (cmpxchgq (% imm1) (@ (% imm2)))
   (jnz @again)
   (box-fixnum imm1 arg_z)
@@ -483,12 +483,12 @@
 
 (defx86lapfunction %atomic-decf-ptr-if-positive ((ptr arg_z))
-  (macptr-ptr ptr ptr)                  ;must be fixnum-aligned
-  @again
-  (movq (@ (% ptr)) (% rax))
+  (macptr-ptr ptr imm2)
+  @again
+  (movq (@ (% imm2)) (% rax))
   (testq (% rax) (% rax))
   (lea (@ -1 (% rax)) (% imm1))
   (jz @done)
   (lock)
-  (cmpxchgq (% imm1) (@ (% ptr)))
+  (cmpxchgq (% imm1) (@ (% imm2)))
   (jnz @again)
   @done
@@ -508,7 +508,7 @@
 ;;; was equal to OLDVAL.  Return the old value
 (defx86lapfunction %ptr-store-conditional ((ptr arg_x) (expected-oldval arg_y) (newval arg_z))
-  (macptr-ptr ptr ptr)                  ;  must be fixnum-aligned
-  @again
-  (movq (@ (% ptr)) (% imm0))
+  (macptr-ptr ptr imm2)
+  @again
+  (movq (@ (% imm2)) (% imm0))
   (box-fixnum imm0 temp0)
   (cmpq (% temp0) (% expected-oldval))
@@ -516,5 +516,5 @@
   (unbox-fixnum newval imm1)
   (lock)
-  (cmpxchgq (% imm1) (@ (% ptr)))
+  (cmpxchgq (% imm1) (@ (% imm2)))
   (jne @again)
   @done
Index: /branches/event-ide/ccl/level-0/l0-init.lisp
===================================================================
--- /branches/event-ide/ccl/level-0/l0-init.lisp	(revision 8052)
+++ /branches/event-ide/ccl/level-0/l0-init.lisp	(revision 8053)
@@ -65,5 +65,4 @@
     #+darwinppc-target :darwinppc-target
     #+darwinppc-target :darwinppc-host
-    #+darwinppc-target :darwin
     #+darwinppc-target :darwin-target
     #+freebsd-target :freebsd-host
@@ -86,4 +85,7 @@
     #+x86-target :little-endian-target
     #+x86-target :little-endian-host
+    #+darwin-target :darwin
+    #+linux-target :linux
+    #+freebsd-target :freebsd
     :mcl                                ;deprecated
     )
Index: /branches/event-ide/ccl/level-1/l1-error-system.lisp
===================================================================
--- /branches/event-ide/ccl/level-1/l1-error-system.lisp	(revision 8052)
+++ /branches/event-ide/ccl/level-1/l1-error-system.lisp	(revision 8053)
@@ -439,9 +439,14 @@
 (define-condition arithmetic-error (error) 
   ((operation :initform nil :initarg :operation :reader arithmetic-error-operation)
-   (operands :initform nil :initarg :operands :reader arithmetic-error-operands))
-  (:report (lambda (c s) (format s "~S detected ~&performing ~S on ~:S"
-                                 (type-of c) 
-                                 (arithmetic-error-operation c) 
-                                 (arithmetic-error-operands c)))))
+   (operands :initform nil :initarg :operands :reader arithmetic-error-operands)
+   (status :initform nil :initarg :status :reader arithmetic-error-status))
+  (:report (lambda (c s)
+             (format s "~S detected "
+                     (type-of c))
+             (let* ((operands (arithmetic-error-operands c)))
+               (when operands
+                 (format s "~&performing ~S on ~:S"
+                         (arithmetic-error-operation c) 
+                         operands))))))
 
 (define-condition division-by-zero (arithmetic-error))
Index: /branches/event-ide/ccl/level-1/l1-lisp-threads.lisp
===================================================================
--- /branches/event-ide/ccl/level-1/l1-lisp-threads.lisp	(revision 8052)
+++ /branches/event-ide/ccl/level-1/l1-lisp-threads.lisp	(revision 8053)
@@ -197,4 +197,5 @@
           (lisp-thread.startup-function thread)
           (thread-make-startup-function thread tcr)))
+  (thread-change-state thread :exit :reset)
   thread)
 
@@ -300,4 +301,5 @@
 	  (lisp-thread.startup-function thread)
 	  (thread-make-startup-function thread tcr))
+    (thread-change-state thread :exit :reset)
     tcr))
   
Index: /branches/event-ide/ccl/level-1/x86-trap-support.lisp
===================================================================
--- /branches/event-ide/ccl/level-1/x86-trap-support.lisp	(revision 8052)
+++ /branches/event-ide/ccl/level-1/x86-trap-support.lisp	(revision 8053)
@@ -29,4 +29,6 @@
   (defconstant flags-register-offset #$REG_EFL)
   (defconstant rip-register-offset #$REG_RIP)
+  (defun xp-mxcsr (xp)
+    (pref xp :ucontext.uc_mcontext.fpregs.mxcsr))
   (defparameter *encoded-gpr-to-indexed-gpr*
     #(13                                ;rax
@@ -54,4 +56,7 @@
   (defconstant flags-register-offset 22)
   (defconstant rip-register-offset 20)
+  (defun xp-mxcsr (xp)
+    (with-macptrs ((state (pref xp :__ucontext.uc_mcontext.mc_fpstate)))
+      (pref state :savefpu.sv_env.en_mxcsr)))
   (defparameter *encoded-gpr-to-indexed-gpr*
     #(7					;rax
@@ -97,4 +102,7 @@
                  (:uc_mcsize (:unsigned 64))
                  (:uc_mcontext64 (:* (:struct :portable_mcontext64))))))
+  (defun xp-mxcsr (xp)
+    (%get-unsigned-long
+     (pref (pref xp :portable_ucontext64.uc_mcontext64) :portable_mcontext64.fs) 32))
   (defconstant gp-regs-offset 0)
   (defmacro xp-gp-regs (xp)
@@ -182,4 +190,5 @@
            (multiple-value-bind (operation operands)
                (decode-arithmetic-error xp xcf)
+             
              (let* ((condition-name
                      (cond ((or (= code #$FPE_INTDIV)
@@ -196,5 +205,6 @@
                (%error (make-condition condition-name
                                        :operation operation
-                                       :operands operands)
+                                       :operands operands
+                                       :status (xp-mxcsr xp))
                        ()
                        frame-ptr))))
