Cool trick to share : assert !

Amstrad CPC and NC systems
Post Reply
norecess
Member
Posts: 73
Joined: Thu Mar 20, 2008 12:58 am

Cool trick to share : assert !

Post by norecess »

Yop,

When using WinAPE Amstrad CPC emulator, if runned code is 0xED, 0xFF then it activates a Breakpoint and show the debugger.

I added the followiing in my z88dk project :

Code: Select all

#define crASSERT( expression ) \
        if ( !( expression ) ) \
        { \
                asm( "defb $ed, $ff" ); \
        }

#define crBREAK( ) \
        asm( "defb $ed, $ff" );
Hope this can help !
Post Reply