RISC OS Open
Safeguarding the past, present and future of RISC OS for everyone
ROOL
Home | News | Downloads | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

Previous|Next

  • Tickets
  • » Ticket #467

Ticket #467 (Fixed)Mon May 06 16:35:49 UTC 2019

TaskWindow not returning Escape character as per PRM 1-870

Reported by: Richard Coleman (3190) Severity: Minor
Part: RISC OS: Module Release:
Milestone: Status Fixed

Details by Richard Coleman (3190):

When calling OS_Byte 129 to read a key within a time limit, the Escape key is not returning &1B in R2, as PRM 1-870 states it should.

Assembled the following code fragment in ObjAsm:

SWI OS_WriteS
DCB “Press Escape …”,0
ALIGN
MOV r0, #129
MOV r1, #&E8 ; Wait 10 seconds
MOV r2, #3
SWI OS_Byte

SWI Report_Regs ; Using Reporter to show registers and flags.

When run in a TaskWindow, pressing Escape, returns R2 = 0 and the C flag clear. R2 = 0 indicates that it has read a key within the time limit, but R1, which should hold the key character, instead = 0.
When run outside the Desktop, R2 = &1B and the C flag is set, as per PRM.

Looking at the code for the TaskWindow, the fix is to replace line 3481:
LDRB R0, EscPending
with:
LDRB R0, EscWasSet

Hacked the TaskWindow module on my ARMX6 to confirm it worked okay.

The reason EscPending is wrong as there is a BL RestoreEscape a few lines before which set EscPending to 0 and so the subsequent jump to label 35 never happens.
RestoreEscape move the value that was in EscPending into EscWasSet, which is why the change works.
Looking back through previous versions it seems this particular bit has never worked.
RISC OS Adjust 4.39 also returns R2 = 0 instead of R2 = &1B.

Have emailed amended version of Taskman to ROOL.

Changelog:

Modified by Richard Coleman (3190) Mon, June 10 2019 - 16:26:27 GMT

  • Status changed from Open to Fixed

Tested okay using nightly build of Pi3 Beta ROM 2019-06-10 05:47:43

  • Comment on, or change status of, this ticket

Previous|Next

Search tickets

Social

Follow us on and

ROOL Store

Buy RISC OS Open merchandise here, including SD cards for Raspberry Pi and more.

Donate! Why?

Help ROOL make things happen – please consider donating!

RISC OS IPR

RISC OS is an Open Source operating system owned by RISC OS Developments Ltd and licensed primarily under the Apache 2.0 license.

Options

  • Tickets
  • New ticket
  • Milestones
  • Subversion: Changesets
  • Subversion: Browse
  • CVS: Revisions
  • CVS: Browse
  • Search

RSS feeds Rss

  • Tickets
  • Everything!
  • More feeds...
Site design © RISC OS Open Limited 2018 except where indicated
The RISC OS Open Collaboa theme is distantly based on the Collaboa default layout

Valid XHTML 1.0  |  Valid CSS

Powered by Collaboa
This site runs on Rails

Hosted by Arachsys