FictionTools/z88dk/src/sccz80/codegen.c
/* Swap the primary and secondary registers */
Swap the primary and secondary registers
Swap the primary and secondary registers
void swap(void)
{
    if ( IS_GBZ80() ) {
        ol("push\thl");
        ol("ld\tl,e");
        ol("ld\th,d");
        ol("pop\tde");
    } else {
        ol("ex\tde,hl");
    }
}
void swap ( void ) { if ( IS_GBZ80 ( ) ) { ol ( " \t " ) ; ol ( " \t " ) ; ol ( " \t " ) ; ol ( " \t " ) ; } else { ol ( " \t " ) ; } }
Swap the primary and secondary registers
Swap the primary and secondary registers
// Crude emulation - we can probably do better on a case by case basis