diff --git a/hdr/Wimp b/hdr/Wimp
index 200c298f5ce9e3c27bda25841b67c43f8dde2c07..d5b880a956172747b314a35a9def35bc19832a4b 100644
--- a/hdr/Wimp
+++ b/hdr/Wimp
@@ -177,7 +177,7 @@ WimpSysInfo_ScrollPause         #       1               ; Wimp 3.99 onwards
 WimpSysInfo_Reserved_ROL18      #       1               ; RISC OS Select
 WimpSysInfo_Reserved_ROL19      #       1               ; RISC OS Select
 WimpSysInfo_Reserved_ROL20      #       1               ; RISC OS Select
-WimpSysInfo_Reserved_ROL21      #       1               ; RISC OS Select
+WimpSysInfo_TextSelection       #       1               ; Wimp 5.79 and RISC OS Select onwards
 WimpSysInfo_Reserved_ROL22      #       1               ; RISC OS Select
 WimpSysInfo_DragPause           #       1               ; Wimp 5.14 onwards
 WimpSysInfo_DoubleClickPause    #       1               ; Wimp 5.14 onwards
@@ -221,6 +221,19 @@ WimpTextOp_RightJustify         *       1 :SHL: 31
 WimpTextOp_VerticalJustify      *       1 :SHL: 30
 WimpTextOp_Style                *       1 :SHL: 29
 
+; Flags for Wimp_ReadSysInfo text selection
+
+WimpTextSelection_Enabled       *       1:SHL:0         ; Wimp CnP in writeables
+WimpTextSelection_EffectNOP     *       0
+WimpTextSelection_EffectDelete  *       1
+WimpTextSelection_EffectClear   *       2
+WimpTextSelection_EffectCut     *       3
+WimpTextSelection_EffectMask    *       2_11            ; 2 bits to describe the effect
+WimpTextSelection_InsertEffectShift *   1               ; Insert key and synonyms
+WimpTextSelection_DeleteEffectShift *   3               ; Delete key and synonyms
+WimpTextSelection_MoveEffectShift   *   5               ; Caret moved with cursors
+WimpTextSelection_AutoSelectEnabled *   1:SHL:7         ; Text is auto-selected when caret enters
+
 ; Priority for Wimp_CreateIcon (iconbar)
 
 WimpPriority_Maximum            *       &78000000       ; used for handle = -3 or -4
diff --git a/s/Wimp01 b/s/Wimp01
index 83a7d034f40961148d095cac0856a49f47879d30..7d824735dbec9883f8e36ab9e5ed29dfe14924eb 100644
--- a/s/Wimp01
+++ b/s/Wimp01
@@ -5523,7 +5523,7 @@ SWIWimp_ReadSysInfo
         B       err_badR0               ; 18= ?                        (ROL)
         B       err_badR0               ; 19= priority sprite area     (ROL)
         B       err_badR0               ; 20= special highlight colour (ROL)
-        B       err_badR0               ; 21= text selection behaviour (ROL)
+        B       sysinfo_textselection   ; 21= text selection behaviour
         B       err_badR0               ; 22= caret colour             (ROL)
         B       sysinfo_dragging        ; 23= mouse drag delay
         B       sysinfo_doubleclicks    ; 24= double click delay
@@ -5612,6 +5612,16 @@ sysinfo_IconBarInt
         STMIA   sp,{R1-R4}
         B       ExitWimp
 
+sysinfo_textselection
+        MOV     R0,#-1                  ; fg always from icon's own colours
+        MOV     R1,#-1                  ; bg always from icon's own colours
+        MOV     R2,#WimpTextSelection_Enabled :OR: \
+                    (WimpTextSelection_EffectDelete:SHL:WimpTextSelection_InsertEffectShift) :OR: \
+                    (WimpTextSelection_EffectCut:SHL:WimpTextSelection_DeleteEffectShift) :OR: \
+                    (WimpTextSelection_EffectClear:SHL:WimpTextSelection_MoveEffectShift)
+        STMIA   sp,{R1-R2}
+        B       ExitWimp
+
 sysinfo_dragging
         LDRB    R0,drag_movelimit
         LDR     R1,drag_timelimit