FictionTools/z88dk/src/sccz80/codegen.c
/*
 *  Store type at TOS - used for initialising auto vars
 */
Store type at TOS - used for initialising auto vars
Store type at TOS - used for initialising auto vars
void StoreTOS(char typeobj)
{
    switch (typeobj) {
    case KIND_LONG:
        lpush();
        return;
    case KIND_CHAR:
        ol("dec\tsp");
        LoadAccum();
        mainpop();
        ol("ld\tl,a");
        zpush();
        Zsp--;
        return;
    case KIND_DOUBLE:
        dpush();
        return;
    case KIND_CPTR:
        ol("dec\tsp");
        ol("ld\ta,e");
        zpop(); 
        ol("ld\te,a");
        zpushde();
        zpush();
        Zsp--;
        return;
    default:
        zpush();
        return;
    }
}
void StoreTOS ( char typeobj ) { switch ( typeobj ) { case KIND_LONG : lpush ( ) ; return ; case KIND_CHAR : ol ( " \t " ) ; LoadAccum ( ) ; mainpop ( ) ; ol ( " \t " ) ; zpush ( ) ; Zsp -- ; return ; case KIND_DOUBLE : dpush ( ) ; return ; case KIND_CPTR : ol ( " \t " ) ; ol ( " \t " ) ; zpop ( ) ; ol ( " \t " ) ; zpushde ( ) ; zpush ( ) ; Zsp -- ; return ; default : zpush ( ) ; return ; } }
Store type at TOS - used for initialising auto vars
Store type at TOS - used for initialising auto vars
/* KIND_CPTR..untested */ /* pop de */