WriteReg 1.08 (18 May 2020)  nemo 2002-2020

This is a small debugging module that implements a number of SWIs to
display the contents of any register, or the processor flags.


SWIs

Write_R0 to Write_R15 display the contents of the user registers as a
hexadecimal number followed by a space.

Write_R14 displays the user's return address - in a 26bit mode this will
include flags.

Write_R15 displays the user's R15 when the SWI was called - in a 26bit
mode this will include flags.

Write_PC displays the user's PC without flags.

Write_X only displays its own SWI number, but can tell whether you called
the 'X' version or not.

Write_CPSR displays the current flags and mode, for processors that support it.

Write_SPSR displays the saved flags and mode, for processors that support it.

Write_NZCV displays the user's flags as four characters followed by a space.

Write_All displays registers R0-R15 as a 4x4 grid.

Write_Many displays any of registers R0-R15, selected by the low 16 bits of R9
(selecting the display of R9 is therefore not terribly useful). If R9 is zero,
all the registers are displayed. Displays up to four registers per line.

Compatibility

This module is NOT compatible with 6.20 due to its much more complicated stack
handling and my laziness - let me know if you need it to be.

Tested on 3.5, 3.7, 4.0, 4.3, 5.1, 5.2.


History

  1.00  03 Aug 2002     First version
  1.01  17 Jan 2018     Bugfix and extra functions
  1.02  10 May 2018     Output a space too
  1.03  12 May 2018     Write_PC is different from Write_R15 in 26bit mode
  1.04  11 Aug 2019     Trivial correction to initialisation
  1.05  13 Sep 2019     Allocated a SWI number - full release
  1.06  04 Nov 2019     Correction to flag order
  1.07  11 Feb 2020     Refuses to multiply instantiate
  1.08  18 May 2020     Added 'All' and 'Many', better compatibility with 4.2x

Copyright

   nemo 2002-2020      Freeware


Contact

  nemo@20000.org                                           writereg.20000.org
