4 ; Debugging with VDUStream
5 ; VDUStream is copyright Computer Concepts. Distribution terms appear to
8 ; © 1994-1998 Straylight
11 ;----- Licensing note -------------------------------------------------------
13 ; This file is part of Straylight's core library (corelib).
15 ; Corelib is free software; you can redistribute it and/or modify
16 ; it under the terms of the GNU General Public License as published by
17 ; the Free Software Foundation; either version 2, or (at your option)
20 ; Corelib is distributed in the hope that it will be useful,
21 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
22 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ; GNU General Public License for more details.
25 ; You should have received a copy of the GNU General Public License
26 ; along with Corelib. If not, write to the Free Software Foundation,
27 ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 ;----- Overview -------------------------------------------------------------
47 ; Use: Saves R0, R14 and the current flags so that they can be
48 ; restored by a subsequent LOAD.
52 $label STMFD R13!,{R0,R14}
60 ; Use: Restores R0, R14 and the flags after a SAVE.
64 $label LDMFD R13!,{R14}
71 ; Arguments: msg == message to print
74 ; Use: Inserts a Sledgehammer breakpoint in the code.
81 ADD PC,PC,#(36+:LEN:"$msg"+4) :AND: -4
90 SWI Sledgehammer_BreakPoint
96 ; Arguments: str == a string to display
98 ; Use: Writes a given string to VDUStream.
108 ; --- Macro: REGH ---
110 ; Arguments: r == the register symbol to display
111 ; str == an optional name for the value
113 ; Use: Writes to VDUStream the value of the given register as
131 ; --- Macro: REGC ---
133 ; Arguments: r == the register symbol to display
134 ; str == an optional name for the value
136 ; Use: Writes to VDUStream the value of the given register as
156 ; --- Macro: REGD ---
158 ; Arguments: r == the register symbol to display
159 ; str == an optional name for the value
161 ; Use: Writes to VDUStream the value of the given register as
179 ; --- Macro: REGS ---
181 ; Arguments: r == the register symbol to display
182 ; str == an optional name for the value
184 ; Use: Writes to VDUStream the null terminated string pointed to
185 ; by the given register.
204 ; --- Macro: RDUMP ---
206 ; Arguments: str == an optional heading string for the register dump
208 ; Use: Displays a total register dump.
212 IMPORT stream_regDump
213 $label STMFD R13!,{R0-PC}
225 ;----- That's all, folks ----------------------------------------------------