Commit e43e67f3 authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Add DADebug support to Hdr:Debug

Detail:
  hdr/Debug - Added DADebug support. Doesn't cache the DADebug WriteC pointer in memory anywhere, so can safely be used from a ROM module or if DADebug is loaded/unloaded.
Admin:
  Tested on BB-xM


Version 2.43. Tagged as 'HdrSrc-2_43'
parent 66481a23
/* (2.42)
/* (2.43)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 2.42
#define Module_MajorVersion_CMHG 2.43
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 09 Mar 2014
#define Module_Date_CMHG 29 Jun 2014
#define Module_MajorVersion "2.42"
#define Module_Version 242
#define Module_MajorVersion "2.43"
#define Module_Version 243
#define Module_MinorVersion ""
#define Module_Date "09 Mar 2014"
#define Module_Date "29 Jun 2014"
#define Module_ApplicationDate "09-Mar-14"
#define Module_ApplicationDate "29-Jun-14"
#define Module_ComponentName "HdrSrc"
#define Module_ComponentPath "castle/RiscOS/Sources/Programmer/HdrSrc"
#define Module_FullVersion "2.42"
#define Module_HelpVersion "2.42 (09 Mar 2014)"
#define Module_LibraryVersionInfo "2:42"
#define Module_FullVersion "2.43"
#define Module_HelpVersion "2.43 (29 Jun 2014)"
#define Module_LibraryVersionInfo "2:43"
......@@ -63,6 +63,7 @@ OldOpt SETA {OPT}
; Debug_File - Set to "<filename>" to send debug stream to the specified file
; (Host_Debug must be set to false).
; Debug_Module - Set to true to use DebugItModule.
; Debug_DADebug - Set to true to use DADebug
;
; When using TML it is necessary to initialise the TML code. To do this the MACRO
; InsertTMLInitialisation must be invoked in the module initialisation code, it assumes
......@@ -99,6 +100,9 @@ Debug_File SETS ""
GBLL Debug_Module
Debug_Module SETL False
GBLL Debug_DADebug
Debug_DADebug SETL False
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Routines for starting and ending debug routines
; Ensure enough stashed so that flags, r0 and lr may be used by debugging routines
......@@ -147,9 +151,9 @@ $label
MACRO
$label DWriteI $char,$cc
[ Host_Debug
[ Host_Debug :LOR: Debug_DADebug
$label MOV$cc r0, #"$char"
[ HostDebugViaTML
[ HostDebugViaTML :LOR: Debug_DADebug
BL$cc TML_WriteC
|
SWI$cc XHostFS_WriteC
......@@ -171,8 +175,8 @@ $label SWI$cc XOS_WriteI+"$char"
MACRO
$label DWriteC $cc
[ Host_Debug
[ HostDebugViaTML
[ Host_Debug :LOR: Debug_DADebug
[ HostDebugViaTML :LOR: Debug_DADebug
$label BL$cc TML_WriteC
|
$label SWI$cc XHostFS_WriteC
......@@ -192,7 +196,7 @@ $label SWI$cc XOS_WriteC
MACRO
$label DNewLine $cc
[ Host_Debug :LOR: Debug_Module
[ Host_Debug :LOR: Debug_Module :LOR: Debug_DADebug
$label BL$cc Tutu_NewLine
|
[ "$Debug_File"<>""
......@@ -205,7 +209,7 @@ $label SWI$cc XOS_NewLine
MACRO
$label DWrite0 $cc
[ Host_Debug :LOR: "$Debug_File"<>"" :LOR: Debug_Module
[ Host_Debug :LOR: "$Debug_File"<>"" :LOR: Debug_Module :LOR: Debug_DADebug
$label BL$cc Tutu_Write0
|
$label SWI$cc XOS_Write0
......@@ -214,7 +218,7 @@ $label SWI$cc XOS_Write0
MACRO
$label DWriteN $cc
[ Host_Debug :LOR: "$Debug_File"<>"" :LOR: Debug_Module
[ Host_Debug :LOR: "$Debug_File"<>"" :LOR: Debug_Module :LOR: Debug_DADebug
$label BL$cc Tutu_WriteN
|
$label SWI$cc XOS_WriteN
......@@ -234,7 +238,7 @@ $label DWriteS $string
[ "$string" = ""
$label DWriteI " "
|
[ Host_Debug :LOR: "$Debug_File"<>"" :LOR: Debug_Module
[ Host_Debug :LOR: "$Debug_File"<>"" :LOR: Debug_Module :LOR: Debug_DADebug
$label BL Tutu_WriteS
|
$label SWI XOS_WriteS
......@@ -488,7 +492,7 @@ Tutu_DoInverse
DWriteN
DExitS , cxsf
[ Host_Debug :LOR: "$Debug_File"<>"" :LOR: Debug_Module
[ Host_Debug :LOR: "$Debug_File"<>"" :LOR: Debug_Module :LOR: Debug_DADebug
InsertHostCompatibleDebugRoutines
]
......@@ -636,6 +640,18 @@ Debug_FileHandle DCD 0
Debug_FileName DCB "$Debug_File",0
ALIGN
]
[ Debug_DADebug
TML_WriteC ROUT
DEntryS "r0,r1"
SWI &731C0 ; XDADebug_GetWriteCAddress
MOVVS r0,#0
MOVS r1,r0
LDRNE r0,[r13,#4]
MOVNE lr,pc
MOVNE pc,r1
DExitS , cxsf
]
MEND
; End of the debug routines
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment