mirror of
https://github.com/gbdk-2020/gbdk-2020.git
synced 2026-03-06 15:29:00 +01:00
29 lines
724 B
C
29 lines
724 B
C
/** @file gb/crash_handler.h
|
|
|
|
When crash_handler.h is included, a crash dump screen
|
|
will be displayed if the CPU executes uninitalized
|
|
memory (with a value of 0xFF, the opcode for RST 38).
|
|
A handler is installed for RST 38 that calls
|
|
@ref __HandleCrash().
|
|
|
|
\code{.c}
|
|
#include <gb/crash_handler.h>
|
|
\endcode
|
|
|
|
Also see the `crash` example project included with gbdk.
|
|
*/
|
|
#ifndef __CRASH_HANDLER_INCLUDE
|
|
#define __CRASH_HANDLER_INCLUDE
|
|
|
|
#include <types.h>
|
|
|
|
/** Display the crash dump screen.
|
|
|
|
See the intro for this file for more details.
|
|
*/
|
|
void __HandleCrash(void);
|
|
#if defined(__SDCC)
|
|
static void __CRASH_HANDLER_INIT__(void) __naked { __asm__(".globl ___HandleCrash"); }
|
|
#endif
|
|
|
|
#endif |