OpenCores
URL https://opencores.org/ocsvn/light8080/light8080/trunk

Subversion Repositories light8080

[/] [light8080/] [trunk/] [tools/] [c80/] [c80.c] - Diff between revs 66 and 67

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 66 Rev 67
Line 673... Line 673...
                                        if (!number(num) & !pstr(num))
                                        if (!number(num) & !pstr(num))
                                                error("could not find initialization value");
                                                error("could not find initialization value");
 
 
                                        // save the values according to variable type 
                                        // save the values according to variable type 
                                        if (typ==cint) {
                                        if (typ==cint) {
                                                inittbq[inittbptr++] = (char)((num[0]>>16)&255);
 
                                                inittbq[inittbptr++] = (char)(num[0]&255);
                                                inittbq[inittbptr++] = (char)(num[0]&255);
 
                                                inittbq[inittbptr++] = (char)((num[0]>>8)&255);
                                        }
                                        }
                                        else
                                        else
                                                inittbq[inittbptr++] = (char)(num[0]&255);
                                                inittbq[inittbptr++] = (char)(num[0]&255);
                                        // update index 
                                        // update index 
                                        idx=1;
                                        idx=1;
 
 
                                        // init to end of array is more than one 
                                        // init to end of array is more than one 
                                        while (idx++ < k) {
                                        while (idx++ < k) {
                                                // fill the reset of the init list with zeros 
                                                // fill the rest of the init list with zeros 
                                                if (typ==cint) {
                                                if (typ==cint) {
                                                        inittbq[inittbptr++] = 0;
                                                        inittbq[inittbptr++] = 0;
                                                        inittbq[inittbptr++] = 0;
                                                        inittbq[inittbptr++] = 0;
                                                }
                                                }
                                                else
                                                else
Line 2404... Line 2404...
{       if(typeobj==cchar)callrts("ccgchar");
{       if(typeobj==cchar)callrts("ccgchar");
                else callrts("ccgint");
                else callrts("ccgint");
}
}
/* Swap the primary and secondary registers */
/* Swap the primary and secondary registers */
swap()
swap()
{       ol("xchg");
{       ol("ex de,hl");
}
}
/* Print partial instruction to get an immediate value */
/* Print partial instruction to get an immediate value */
/*      into the primary register */
/*      into the primary register */
immed()
immed()
{       ot("ld hl,");
{       ot("ld hl,");

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.