git.y1.nz

gbdk-2020

GameBoy Development Kit
download: https://git.y1.nz/archives/gbdk.tar.gz
README | Files | Log | Refs | LICENSE

gbdk-lib/include/gb/crash_handler.h

      1 /** @file gb/crash_handler.h
      2 
      3     When crash_handler.h is included, a crash dump screen
      4     will be displayed if the CPU executes uninitalized
      5     memory (with a value of 0xFF, the opcode for RST 38).
      6     A handler is installed for RST 38 that calls
      7     @ref __HandleCrash().
      8 
      9     \code{.c}
     10     #include <gb/crash_handler.h>
     11     \endcode
     12 
     13     Also see the `crash` example project included with gbdk.
     14 */
     15 #ifndef __CRASH_HANDLER_INCLUDE
     16 #define __CRASH_HANDLER_INCLUDE
     17 
     18 #include <types.h>
     19 
     20 /** Display the crash dump screen.
     21 
     22     See the intro for this file for more details.
     23 */
     24 void __HandleCrash(void);
     25 #if defined(__SDCC)
     26 static void __CRASH_HANDLER_INIT__(void) __naked { __asm__(".globl ___HandleCrash"); }
     27 #endif
     28 
     29 #endif

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.