2 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
3 * See the copyright notice in the ACK home directory, in the file "Copyright".
8 static char rcs_mach[] = "$Id: mach.c,v 2.4 1994/06/24 13:55:11 ceriel Exp $" ;
9 static char rcs_h[] = RCS_H ;
13 * machine dependent back end routines for the Zilog Z80 (as well as Intel 8080)
16 con_part(sz,w) register sz; word w; {
18 while (part_size % sz)
20 if (part_size == TEM_WSIZE)
34 con_mult(sz) word sz; {
38 fatal("bad icon/ucon size");
39 fprintf(codefile, ".data4\t%ld\n", atol(str));
46 if (sz != 4 && sz != 8) {
47 fatal("bad fcon size");
51 fprintf(stderr,"warning: dummy floating constant(s)\n");
54 fprintf(codefile, ".data4 0 !dummy float\n");
60 prolog(nlocals) full nlocals; {
62 fprintf(codefile,"\tpush\tiy\n\tld\thl,0\n\tadd\thl,sp\n\tpush\thl\n\tpop\tiy\n");
64 case 8: fprintf(codefile,"\tpush\thl\n");
65 case 6: fprintf(codefile,"\tpush\thl\n");
66 case 4: fprintf(codefile,"\tpush\thl\n");
67 case 2: fprintf(codefile,"\tpush\thl\n");
70 fprintf(codefile,"\tld\thl,%d\n\tadd\thl,sp\n\tld\tsp,hl\n",-nlocals);
75 mes(type) word type ; {
78 switch ( (int)type ) {
82 ptyp(sp_cend)|ptyp(sp_pnam)|sym_ptyp) ) {
87 fprintf(codefile,".define %s\n",argstr) ;
92 while ( getarg(any_ptyp) != sp_cend ) ;