Return to m68k.h CVS log | Up to [gforth] / gforth |
Reorganized configuration: configure is now created by autoconf from configure.in; I still left it in the CVS repository because not everyone has autoconf. decstation.h renamed to mips.h and apollo68k to m68k. Added general 32bit.h description, which the other machine descriptions use. Created/copied replacement files install-sh memcmp.c memmove.c select.c (carved out from ecvt.c) strtol.c strtoul.c. Bytesex is now handled by configure. Deciding the threading method is now done in machine.h, this should also be done for USE_TOS and USE_FTOS.
1: /* 2: $Id: m68k.h,v 1.1 1994/12/12 17:10:41 anton Exp $ 3: Copyright 1992 by the ANSI figForth Development Group 4: 5: This is the machine-specific part for the 68000 and family 6: */ 7: 8: #include "32bit.h" 9: 10: #ifdef DIRECT_THREADED 11: /* PFA gives the parameter field address corresponding to a cfa */ 12: #define PFA(cfa) (((Cell *)cfa)+2) 13: /* PFA1 is a special version for use just after a NEXT1 */ 14: #define PFA1(cfa) PFA(cfa) 15: /* CODE_ADDRESS is the address of the code jumped to through the code field */ 16: #define CODE_ADDRESS(cfa) (*(Label *)(((char *)(cfa))+2)) 17: /* MAKE_CF creates an appropriate code field at the cfa; 18: ca is the code address */ 19: #define MAKE_CF(cfa,ca) ({short * _cfa = (short *)cfa; \ 20: _cfa[0] = 0x4ef9; /* jmp.l */ \ 21: *(long *)(_cfa+1) = (long)(ca);}) 22: 23: /* this is the point where the does code starts if label points to the 24: * jump dodoes */ 25: #define DOES_CODE(label) ((Xt *)(((char *)label)+8)) 26: 27: /* this is a special version of DOES_CODE for use in dodoes */ 28: #define DOES_CODE1(label) DOES_CODE(label) 29: 30: /* this stores a jump dodoes at ca */ 31: #define MAKE_DOESJUMP(ca) ({short * _ca = (short *)ca; \ 32: _ca[0] = 0x4ef9; /* jmp.l */ \ 33: *(long *)(_ca+1) = (long)&&dodoes;}) 34: #endif 35: