diff --git a/VersionASM b/VersionASM
index b005760bdb923d2b002d283edc4aeefe3c90eb21..293b2d49394977925906c6ad60e0d4dbd80529cc 100644
--- a/VersionASM
+++ b/VersionASM
@@ -13,11 +13,11 @@
                         GBLS    Module_ComponentPath
 Module_MajorVersion     SETS    "5.35"
 Module_Version          SETA    535
-Module_MinorVersion     SETS    "4.79.2.138"
-Module_Date             SETS    "25 Feb 2012"
-Module_ApplicationDate  SETS    "25-Feb-12"
+Module_MinorVersion     SETS    "4.79.2.139"
+Module_Date             SETS    "11 Mar 2012"
+Module_ApplicationDate  SETS    "11-Mar-12"
 Module_ComponentName    SETS    "Kernel"
 Module_ComponentPath    SETS    "castle/RiscOS/Sources/Kernel"
-Module_FullVersion      SETS    "5.35 (4.79.2.138)"
-Module_HelpVersion      SETS    "5.35 (25 Feb 2012) 4.79.2.138"
+Module_FullVersion      SETS    "5.35 (4.79.2.139)"
+Module_HelpVersion      SETS    "5.35 (11 Mar 2012) 4.79.2.139"
                         END
diff --git a/VersionNum b/VersionNum
index e24d50f7c428a787b58720a5719095148c8e5a43..bc02520b7a24a6aa1c070b2bfb2589d20b2173d2 100644
--- a/VersionNum
+++ b/VersionNum
@@ -5,19 +5,19 @@
  *
  */
 #define Module_MajorVersion_CMHG        5.35
-#define Module_MinorVersion_CMHG        4.79.2.138
-#define Module_Date_CMHG                25 Feb 2012
+#define Module_MinorVersion_CMHG        4.79.2.139
+#define Module_Date_CMHG                11 Mar 2012
 
 #define Module_MajorVersion             "5.35"
 #define Module_Version                  535
-#define Module_MinorVersion             "4.79.2.138"
-#define Module_Date                     "25 Feb 2012"
+#define Module_MinorVersion             "4.79.2.139"
+#define Module_Date                     "11 Mar 2012"
 
-#define Module_ApplicationDate          "25-Feb-12"
+#define Module_ApplicationDate          "11-Mar-12"
 
 #define Module_ComponentName            "Kernel"
 #define Module_ComponentPath            "castle/RiscOS/Sources/Kernel"
 
-#define Module_FullVersion              "5.35 (4.79.2.138)"
-#define Module_HelpVersion              "5.35 (25 Feb 2012) 4.79.2.138"
+#define Module_FullVersion              "5.35 (4.79.2.139)"
+#define Module_HelpVersion              "5.35 (11 Mar 2012) 4.79.2.139"
 #define Module_LibraryVersionInfo       "5:35"
diff --git a/s/NewReset b/s/NewReset
index b581981ee48f489ee549f3ca5871b87f46b82942..56bdd9801450360da3c480724270e7dbfc2a2653 100644
--- a/s/NewReset
+++ b/s/NewReset
@@ -938,9 +938,36 @@ not_full_reset
         BL      Write
 
  [ HAL
+     [ M_32
+; M_32 used for IOMD based machines, select quadrature or PS2 as appropriate
+        AddressHAL
+        MOV     R0, #0
+        MOV     R1, #&400
+        CallHAL HAL_ControllerAddress
+        CMP     R0, #0
+        MOVEQ   R1, #PointerDevice_USB
+        BEQ     program_mousetype
+        LDRB    R1, [R0, #IOMD_ID1]
+        LDRB    R0, [R0, #IOMD_ID0]
+        ORR     R0, R0, R1, LSL #8
+        LDR     R1, =IOMD_Original
+        TEQ     R0, R1
+        MOVEQ   R1, #PointerDevice_QuadMouse
+        BEQ     program_mousetype
+        LDR     R1, =IOMD_7500
+        TEQ     R0, R1
+        LDRNE   R1, =IOMD_7500FE
+        TEQNE   R0, R1
+        MOVEQ   R1, #PointerDevice_PS2Mouse
+        MOVNE   R1, #PointerDevice_USB
+program_mousetype
+        MOV     R0, #MouseCMOS
+        BL      Write
+     |
         MOV     R0, #MouseCMOS
         MOV     R1, #PointerDevice_USB
         BL      Write
+     ]
 
 ; set print and sound CMOS (16bit sound)
         MOV     R0, #TutuCMOS