diff --git a/VersionASM b/VersionASM
index 27db1339114413d3d2d4bc61e303cf783e675b19..d67f3942f2aa859d96be6391684325fb1374011c 100644
--- a/VersionASM
+++ b/VersionASM
@@ -6,9 +6,9 @@
                         GBLS    Module_MinorVersion
                         GBLS    Module_Date
                         GBLS    Module_FullVersion
-Module_MajorVersion     SETS    "5.26"
-Module_Version          SETA    526
+Module_MajorVersion     SETS    "5.27"
+Module_Version          SETA    527
 Module_MinorVersion     SETS    ""
 Module_Date             SETS    "10 May 2000"
-Module_FullVersion      SETS    "5.26"
+Module_FullVersion      SETS    "5.27"
                         END
diff --git a/VersionNum b/VersionNum
index f9e3cf3611040cc54a0b94c97d51db4d67876d3a..6eb31113587d829187ae5e25f724370dffe3d0f6 100644
--- a/VersionNum
+++ b/VersionNum
@@ -1,15 +1,15 @@
-/* (5.26)
+/* (5.27)
  *
  * This file is automatically maintained by srccommit, do not edit manually.
  *
  */
-#define Module_MajorVersion_CMHG        5.26
+#define Module_MajorVersion_CMHG        5.27
 #define Module_MinorVersion_CMHG        
 #define Module_Date_CMHG                10 May 2000
 
-#define Module_MajorVersion             "5.26"
-#define Module_Version                  526
+#define Module_MajorVersion             "5.27"
+#define Module_Version                  527
 #define Module_MinorVersion             ""
 #define Module_Date                     "10 May 2000"
 
-#define Module_FullVersion              "5.26"
+#define Module_FullVersion              "5.27"
diff --git a/s/vdu/vduwrch b/s/vdu/vduwrch
index 784f2e5a6f9e088486146ee7371772d70f3f71c6..02ada601ee9e5d82a24bf7343ca2ee5c0b71532f 100644
--- a/s/vdu/vduwrch
+++ b/s/vdu/vduwrch
@@ -2709,6 +2709,8 @@ DoOSBYTE87
 PageTest
         Push    R14
 
+        BL      Page_ProcessCallbacks   ; give callbacks at least one chance per line
+
         CLC                             ; don't set leds first time
         BL      CtrlShiftTest           ; on exit, C=CTRL, N=SHIFT
         BCC     Page20                  ; CTRL up, then branch
@@ -2722,6 +2724,7 @@ CSWaitLoop
         SEC                             ; set leds
         BL      CtrlShiftTest
         BCC     Page18
+        BLMI    Page_ProcessCallbacks
         BMI     CSWaitLoop              ; and wait for change (NB C=1 now)
 Page18
         BL      PreWrchCursor           ; get rid of cursor again
@@ -2745,6 +2748,7 @@ Page30
         BCC     Page35                  ; CTRL no longer down
         LDROSB  R1, CentiCounter
         CMP     R1, #1
+        BLCS    Page_ProcessCallbacks
         BCS     Page30                  ; loop with carry set
 Page35
         BL      PreWrchCursor           ; remove cursor again
@@ -2783,6 +2787,7 @@ Page50                                  ; NB C=0 on entry from above
 PageWaitLoop
         SEC
         BL      CtrlShiftTest
+        BLPL    Page_ProcessCallbacks
         BPL     PageWaitLoop
         BL      PreWrchCursor
 
@@ -2832,6 +2837,21 @@ CtrlShiftTest ROUT
         MOVS    R0, R0, LSL #(32-6)     ; C=CTRL, N=SHIFT
         MOV     PC, R14
 
+Page_ProcessCallbacks
+        EntryS                          ; routine must preserve flags
+        ; See if there are any pending callbacks
+        MOV     R0, #0
+        LDRB    R14, [R0, #CallBack_Flag]
+        TST     R14, #CBack_VectorReq
+        BLNE    process_callback_chain
+        ; Now they're dealt with, we have nothing else to do, so call Idle
+      [ StorkPowerSave
+        LDR     R14, [r0, #PortableFlags]
+        TST     R14, #PortableFeature_Idle
+        SWINE   XPortable_Idle
+      ]
+        EXITS
+
 ; *****************************************************************************
 ;
 ;       SO - Page mode on